Skip to content

Commit

Permalink
pwm: meson: Drop always false check from .apply()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Thierry Reding committed Feb 1, 2022
1 parent 5f97f18 commit 914195e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/pwm/pwm-meson.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
/*
Expand Down

0 comments on commit 914195e

Please sign in to comment.