summaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-11-08 14:46:27 +0100
committerThierry Reding <thierry.reding@gmail.com>2022-02-01 08:38:10 +0100
commit914195ec7ecb55e0be5404e3e0edc561888dd9f0 (patch)
tree979069bd1d50fc55f77a69be885a5ea1c69ba922 /drivers/pwm
parentpwm: meson: Simplify duplicated per-channel tracking (diff)
downloadlinux-914195ec7ecb55e0be5404e3e0edc561888dd9f0.tar.xz
linux-914195ec7ecb55e0be5404e3e0edc561888dd9f0.zip
pwm: meson: Drop always false check from .apply()
The PWM core only calls the apply callback with a valid state pointer, so don't repeat this check already done in the core. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-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 908e314c7c00..57112f438c6d 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -265,9 +265,6 @@ static int meson_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
int err = 0;
- if (!state)
- return -EINVAL;
-
if (!state->enabled) {
if (state->polarity == PWM_POLARITY_INVERSED) {
/*