Skip to content

Commit 868f13b

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
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 <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent fb2cb3b commit 868f13b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/pwm/pwm-vt8500.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,11 @@ static int vt8500_pwm_remove(struct platform_device *pdev)
240240
{
241241
struct vt8500_chip *chip = platform_get_drvdata(pdev);
242242

243+
pwmchip_remove(&chip->chip);
243244

244245
clk_unprepare(chip->clk);
245246

246-
return pwmchip_remove(&chip->chip);
247+
return 0;
247248
}
248249

249250
static struct platform_driver vt8500_pwm_driver = {

0 commit comments

Comments
 (0)