3.16.51-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold johan@kernel.org
commit e2b5602af76dec75f474e4173afb4215007ecfa5 upstream.
Make sure to unprepare the clock before returning on late probe errors.
Fixes: b388f15fd14c ("pwm: pwm-tiehrpwm: Use clk_enable/disable instead clk_prepare/unprepare.") Signed-off-by: Johan Hovold johan@kernel.org Signed-off-by: Thierry Reding thierry.reding@gmail.com [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings ben@decadent.org.uk --- --- a/drivers/pwm/pwm-tiehrpwm.c +++ b/drivers/pwm/pwm-tiehrpwm.c @@ -483,7 +483,7 @@ static int ehrpwm_pwm_probe(struct platf ret = pwmchip_add(&pc->chip); if (ret < 0) { dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret); - return ret; + goto err_clk_unprepare; }
pm_runtime_enable(&pdev->dev); @@ -506,7 +506,9 @@ pwmss_clk_failure: pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); pwmchip_remove(&pc->chip); +err_clk_unprepare: clk_unprepare(pc->tbclk); + return ret; }