drm/exynos: propagate plane initialization errors
authorAndrzej Hajda <a.hajda@samsung.com>
Fri, 10 Oct 2014 12:31:53 +0000 (14:31 +0200)
committerInki Dae <daeinki@gmail.com>
Sun, 2 Nov 2014 16:51:28 +0000 (01:51 +0900)
In case of error during plane initialization load callback
incorrectly return success, this patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_drv.c

index 510d7cbb79a5a199d547ce914651367f4416e72d..23fbad5a504a5459696c29b6e2ea0466a5c04cb1 100644 (file)
@@ -87,8 +87,11 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
 
                plane = exynos_plane_init(dev, possible_crtcs,
                                          DRM_PLANE_TYPE_OVERLAY);
-               if (IS_ERR(plane))
-                       goto err_mode_config_cleanup;
+               if (!IS_ERR(plane))
+                       continue;
+
+               ret = PTR_ERR(plane);
+               goto err_mode_config_cleanup;
        }
 
        /* init kms poll for handling hpd */