drm/etnaviv: fix failure path if model is zero
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 24 Jan 2016 17:32:13 +0000 (17:32 +0000)
committerLucas Stach <l.stach@pengutronix.de>
Mon, 25 Jan 2016 13:23:51 +0000 (14:23 +0100)
Fix the failure path to call pm_runtime_mark_last_busy() when failing
due to the model field being zero.

Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c

index 056a72e6ed26273146269ee0258784e8a714d36a..e0e68dd7565d04804e3536ea05b53ec6b33c1d46 100644 (file)
@@ -511,8 +511,8 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 
        if (gpu->identity.model == 0) {
                dev_err(gpu->dev, "Unknown GPU model\n");
-               pm_runtime_put_autosuspend(gpu->dev);
-               return -ENXIO;
+               ret = -ENXIO;
+               goto fail;
        }
 
        ret = etnaviv_hw_reset(gpu);