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>
This commit is contained in:
Laurent Pinchart 2013-07-04 20:05:50 +02:00 committed by Dave Airlie
parent 7c6ca3040e
commit 3463ff67bc

View File

@ -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;