summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-meson.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-11-08 14:46:25 +0100
committerThierry Reding <thierry.reding@gmail.com>2022-02-01 08:34:04 +0100
commitcb971fdb45921bda5b253b6916d8380faec8a8d8 (patch)
tree022631979c5c40c09ced7581c51b7c8f4b594ec9 /drivers/pwm/pwm-meson.c
parentpwm: meson: Drop always false check from .request() (diff)
downloadlinux-cb971fdb45921bda5b253b6916d8380faec8a8d8.tar.xz
linux-cb971fdb45921bda5b253b6916d8380faec8a8d8.zip
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 <u.kleine-koenig@pengutronix.de> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-meson.c')
-rw-r--r--drivers/pwm/pwm-meson.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index be3c806b57e4..1fbe54a2abfe 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,