pwm: vt8500: Undo preparation of a clock source.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 5 May 2017 08:00:14 +0000 (13:30 +0530)
committerThierry Reding <thierry.reding@gmail.com>
Tue, 25 Jul 2017 11:43:28 +0000 (13:43 +0200)
Undo preparation of a clock source if vt8500_pwm_probe() is not
successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-vt8500.c

index 8141a49..3a78dd0 100644 (file)
@@ -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;
        }