pwm: meson: Drop always false check from .apply()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 8 Nov 2021 13:46:27 +0000 (14:46 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Tue, 1 Feb 2022 07:38:10 +0000 (08:38 +0100)
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>
drivers/pwm/pwm-meson.c

index 908e314..57112f4 100644 (file)
@@ -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) {
                        /*