aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-meson.c
diff options
context:
space:
mode:
authorGeorge Stark <[email protected]>2024-04-25 17:12:51 +0000
committerUwe Kleine-König <[email protected]>2024-04-30 16:57:08 +0000
commit6b2d60a543c4ffbb6bd9703a2714b2d5fbfc5781 (patch)
treeb73c024612cc5c6a91499e9e6a43327543a3f7d2 /drivers/pwm/pwm-meson.c
parentdt-bindings: pwm: mediatek,pwm-disp: add compatible for mt8365 SoC (diff)
downloadkernel-6b2d60a543c4ffbb6bd9703a2714b2d5fbfc5781.tar.gz
kernel-6b2d60a543c4ffbb6bd9703a2714b2d5fbfc5781.zip
pwm: meson: Drop unneeded check in .get_state()
Drop checking state argument for NULL pointer in meson_pwm_get_state() due to it is called only from pwm core with always valid arguments. Signed-off-by: Dmitry Rokosov <[email protected]> Signed-off-by: George Stark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-meson.c')
-rw-r--r--drivers/pwm/pwm-meson.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index ea96c5973488..f4d70da621ec 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -311,9 +311,6 @@ static int meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
struct meson_pwm_channel *channel;
u32 value;
- if (!state)
- return 0;
-
channel = &meson->channels[pwm->hwpwm];
channel_data = &meson_pwm_per_channel_data[pwm->hwpwm];