diff mbox

[v1] pwm : pwm-vt8500 - Undo preparation of a clock source.

Message ID 1493971214-3763-1-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arvind Yadav May 5, 2017, 8 a.m. UTC
Undo preparation of a clock source, if vt8500_pwm_probe is not
successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/pwm/pwm-vt8500.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Thierry Reding July 25, 2017, 11:44 a.m. UTC | #1
On Fri, May 05, 2017 at 01:30:14PM +0530, Arvind Yadav wrote:
> Undo preparation of a clock source, if vt8500_pwm_probe is not
> successful.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  drivers/pwm/pwm-vt8500.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

Thierry
diff mbox

Patch

diff --git a/drivers/pwm/pwm-vt8500.c b/drivers/pwm/pwm-vt8500.c
index 8141a49..3a78dd0 100644
--- a/drivers/pwm/pwm-vt8500.c
+++ b/drivers/pwm/pwm-vt8500.c
@@ -241,6 +241,7 @@  static int vt8500_pwm_probe(struct platform_device *pdev)
 	ret = pwmchip_add(&chip->chip);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to add PWM chip\n");
+		clk_unprepare(chip->clk);
 		return ret;
 	}