summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rcar-du
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-07-04 20:05:50 +0200
committerDave Airlie <airlied@redhat.com>2013-07-05 15:34:56 +1000
commit3463ff67bc8d049098559adb850299c26b52350d (patch)
tree38a1d773a651cb2cb87351b0bc271e3ec7acf233 /drivers/gpu/drm/rcar-du
parent7c6ca3040e9ac174e6d2189811da603e9c19a150 (diff)
drm/rcar-du: Don't ignore rcar_du_crtc_create() return value
Handle error cases correctly. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_kms.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index 9c63f39658d..06cacf6532c 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;