Message ID | 20211108134628.120474-4-u.kleine-koenig@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] pwm: meson: Drop always false check from .request() | expand |
On Mon, Nov 8, 2021 at 2:46 PM Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > > 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>
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) { /*
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> --- drivers/pwm/pwm-meson.c | 3 --- 1 file changed, 3 deletions(-)