drm/tegra: Disable clock on probe failure
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 21 Oct 2013 05:38:34 +0000 (13:38 +0800)
committerThierry Reding <treding@nvidia.com>
Thu, 31 Oct 2013 08:55:47 +0000 (09:55 +0100)
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>
drivers/gpu/drm/tegra/gr2d.c

index 73b79ba..7f4eb11 100644 (file)
@@ -186,6 +186,7 @@ static int gr2d_probe(struct platform_device *pdev)
        err = host1x_client_register(&gr2d->client.base);
        if (err < 0) {
                dev_err(dev, "failed to register host1x client: %d\n", err);
+               clk_disable_unprepare(gr2d->clk);
                return err;
        }