drm/tegra: Fix error handling
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sun, 3 Jul 2016 06:18:57 +0000 (08:18 +0200)
committerThierry Reding <treding@nvidia.com>
Mon, 7 Nov 2016 12:01:42 +0000 (13:01 +0100)
It is likely that checking 'gr3d->clk_secondary' instead of 'gr3d->clk'
is expected here.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/gr3d.c

index 0b3f2b9..13f0d1b 100644 (file)
@@ -268,9 +268,9 @@ static int gr3d_probe(struct platform_device *pdev)
 
        if (of_device_is_compatible(np, "nvidia,tegra30-gr3d")) {
                gr3d->clk_secondary = devm_clk_get(&pdev->dev, "3d2");
-               if (IS_ERR(gr3d->clk)) {
+               if (IS_ERR(gr3d->clk_secondary)) {
                        dev_err(&pdev->dev, "cannot get secondary clock\n");
-                       return PTR_ERR(gr3d->clk);
+                       return PTR_ERR(gr3d->clk_secondary);
                }
 
                gr3d->rst_secondary = devm_reset_control_get(&pdev->dev,