diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-21 13:37:31 +0800 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2013-10-31 09:55:46 +0100 |
commit | 9c78c4c38e2c1889f2514c3c76ef190b99f2524a (patch) | |
tree | 6ec44f59af1b6c45c32bde6aea77d8f4b4c9e7b3 /drivers/gpu/host1x | |
parent | db7fbdfd25ee009165b6c3b80a9d1c6d8534ad94 (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>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r-- | drivers/gpu/host1x/dev.c | 4 |
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) err = host1x_syncpt_init(host); if (err) { dev_err(&pdev->dev, "failed to initialize syncpts\n"); - return err; + goto fail_unprepare_disable; } err = host1x_intr_init(host, syncpt_irq); @@ -175,6 +175,8 @@ fail_deinit_intr: host1x_intr_deinit(host); fail_deinit_syncpt: host1x_syncpt_deinit(host); +fail_unprepare_disable: + clk_disable_unprepare(host->clk); return err; } |