From: Uwe Kleine-König Date: Mon, 8 Nov 2021 13:46:25 +0000 (+0100) Subject: pwm: meson: Drop useless check for channel data being NULL X-Git-Tag: v5.18-rc1~54^2~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb971fdb45921bda5b253b6916d8380faec8a8d8;p=thirdparty%2Flinux.git pwm: meson: Drop useless check for channel data being NULL In meson_pwm_free() the function pwm_get_chip_data() always returns a non-NULL pointer because it's only called when the request callback succeeded and this callback calls pwm_set_chip_data() in this case. 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 be3c806b57e4f..1fbe54a2abfe1 100644 --- a/drivers/pwm/pwm-meson.c +++ b/drivers/pwm/pwm-meson.c @@ -148,8 +148,7 @@ static void meson_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) { struct meson_pwm_channel *channel = pwm_get_chip_data(pwm); - if (channel) - clk_disable_unprepare(channel->clk); + clk_disable_unprepare(channel->clk); } static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm,