From: Laurent Pinchart Date: Thu, 4 Jul 2013 18:05:50 +0000 (+0200) Subject: drm/rcar-du: Don't ignore rcar_du_crtc_create() return value X-Git-Tag: v3.11-rc1~65^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3463ff67bc8d049098559adb850299c26b52350d;p=platform%2Fkernel%2Flinux-stable.git drm/rcar-du: Don't ignore rcar_du_crtc_create() return value Handle error cases correctly. Signed-off-by: Laurent Pinchart Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c index 9c63f39..06cacf6 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c @@ -191,8 +191,11 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu) if (ret < 0) return ret; - for (i = 0; i < ARRAY_SIZE(rcdu->crtcs); ++i) - rcar_du_crtc_create(rcdu, i); + for (i = 0; i < ARRAY_SIZE(rcdu->crtcs); ++i) { + ret = rcar_du_crtc_create(rcdu, i); + if (ret < 0) + return ret; + } rcdu->used_crtcs = 0; rcdu->num_crtcs = i;