drm/exynos: fimd: check whether exynos_drm_crtc_create succeed or not
authorHyungwon Hwang <human.hwang@samsung.com>
Tue, 7 Apr 2015 13:19:43 +0000 (22:19 +0900)
committerInki Dae <inki.dae@samsung.com>
Mon, 13 Apr 2015 02:39:41 +0000 (11:39 +0900)
>From the commit "drm/exynos: fix the execution order in FIMD
initialization" (598285bfdce46d7c47632a2ba4b980f60be4a677), the error
checking code is removed improperly. This patch fix the regression.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_fimd.c

index f0390411bb20e6c87d59f59bcd6ba150e21be115..bf29a44cf77b77f229490d7228b2a6890fe9e57d 100644 (file)
@@ -1018,6 +1018,8 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
        ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
                                           ctx->pipe, EXYNOS_DISPLAY_TYPE_LCD,
                                           &fimd_crtc_ops, ctx);
+       if (IS_ERR(ctx->crtc))
+               return PTR_ERR(ctx->crtc);
 
        if (ctx->display)
                exynos_drm_create_enc_conn(drm_dev, ctx->display);