Commit d4ac3917 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding

pwm: bcm-iproc: Free resources only after pwmchip_remove()

Before pwmchip_remove() returns the PWM is expected to be functional. So
remove the pwmchip before disabling the clock.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 89c6f314
......@@ -253,9 +253,11 @@ static int iproc_pwmc_remove(struct platform_device *pdev)
{
struct iproc_pwmc *ip = platform_get_drvdata(pdev);
pwmchip_remove(&ip->chip);
clk_disable_unprepare(ip->clk);
return pwmchip_remove(&ip->chip);
return 0;
}
static const struct of_device_id bcm_iproc_pwmc_dt[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment