aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-10-21 01:37:31 -0400
committerThierry Reding <treding@nvidia.com>2013-10-31 04:55:46 -0400
commit9c78c4c38e2c1889f2514c3c76ef190b99f2524a (patch)
tree6ec44f59af1b6c45c32bde6aea77d8f4b4c9e7b3
parentdb7fbdfd25ee009165b6c3b80a9d1c6d8534ad94 (diff)
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/host1x/dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index ab402a56284c..80da003d63de 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -154,7 +154,7 @@ static int host1x_probe(struct platform_device *pdev)
154 err = host1x_syncpt_init(host); 154 err = host1x_syncpt_init(host);
155 if (err) { 155 if (err) {
156 dev_err(&pdev->dev, "failed to initialize syncpts\n"); 156 dev_err(&pdev->dev, "failed to initialize syncpts\n");
157 return err; 157 goto fail_unprepare_disable;
158 } 158 }
159 159
160 err = host1x_intr_init(host, syncpt_irq); 160 err = host1x_intr_init(host, syncpt_irq);
@@ -175,6 +175,8 @@ fail_deinit_intr:
175 host1x_intr_deinit(host); 175 host1x_intr_deinit(host);
176fail_deinit_syncpt: 176fail_deinit_syncpt:
177 host1x_syncpt_deinit(host); 177 host1x_syncpt_deinit(host);
178fail_unprepare_disable:
179 clk_disable_unprepare(host->clk);
178 return err; 180 return err;
179} 181}
180 182