Commit 9c78c4c3 authored by Wei Yongjun's avatar Wei Yongjun Committed by Thierry Reding

gpu: host1x: Disable clock on probe failure

Add a missing clk_disable_unprepare() before returning from the driver's
.probe() function on error.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: default avatarTerje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent db7fbdfd
...@@ -154,7 +154,7 @@ static int host1x_probe(struct platform_device *pdev) ...@@ -154,7 +154,7 @@ static int host1x_probe(struct platform_device *pdev)
err = host1x_syncpt_init(host); err = host1x_syncpt_init(host);
if (err) { if (err) {
dev_err(&pdev->dev, "failed to initialize syncpts\n"); dev_err(&pdev->dev, "failed to initialize syncpts\n");
return err; goto fail_unprepare_disable;
} }
err = host1x_intr_init(host, syncpt_irq); err = host1x_intr_init(host, syncpt_irq);
...@@ -175,6 +175,8 @@ static int host1x_probe(struct platform_device *pdev) ...@@ -175,6 +175,8 @@ static int host1x_probe(struct platform_device *pdev)
host1x_intr_deinit(host); host1x_intr_deinit(host);
fail_deinit_syncpt: fail_deinit_syncpt:
host1x_syncpt_deinit(host); host1x_syncpt_deinit(host);
fail_unprepare_disable:
clk_disable_unprepare(host->clk);
return err; return err;
} }
......
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