提交 9c78c4c3 编写于 作者: W Wei Yongjun 提交者: 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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: NTerje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册