From: Uwe Kleine-König Date: Mon, 8 Nov 2021 13:46:27 +0000 (+0100) Subject: pwm: meson: Drop always false check from .apply() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=914195ec7ecb55e0be5404e3e0edc561888dd9f0;p=linux.git 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 Reviewed-by: Martin Blumenstingl Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c index 908e314c7c006..57112f438c6dd 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) { /*