diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-06-21 16:04:58 +0300 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2021-06-30 20:12:20 +0300 |
commit | 868f13bdea3304362dd882f216ba30a8bf4c10c8 (patch) | |
tree | af1441ba5045510fb1464d7a9bd3cc68c80fa754 /drivers/pwm | |
parent | fb2cb3bff9e0ede1709620809374dd14c07b1e16 (diff) | |
download | linux-868f13bdea3304362dd882f216ba30a8bf4c10c8.tar.xz |
pwm: vt8500: Only unprepare the clock after the pwmchip was removed
Until pwmchip_remove() returns the PWM is supposed to work, so
pwmchip_remove() must be called before the clock is stopped.
The return value of pwmchip_remove doesn't need to be checked because
it returns zero anyhow and I plan to make it return void soon.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-vt8500.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-vt8500.c b/drivers/pwm/pwm-vt8500.c index 7164df2fbacf..ea2aa151080a 100644 --- a/drivers/pwm/pwm-vt8500.c +++ b/drivers/pwm/pwm-vt8500.c @@ -240,10 +240,11 @@ static int vt8500_pwm_remove(struct platform_device *pdev) { struct vt8500_chip *chip = platform_get_drvdata(pdev); + pwmchip_remove(&chip->chip); clk_unprepare(chip->clk); - return pwmchip_remove(&chip->chip); + return 0; } static struct platform_driver vt8500_pwm_driver = { |