drm/rcar-du: Handle encoder initialization failures
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 1 Apr 2014 11:03:52 +0000 (13:03 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 3 Apr 2014 22:02:54 +0000 (08:02 +1000)
The rcar_du_encoder_init() function can fail and return an error code.
Don't ignore it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/rcar-du/rcar_du_kms.c

index fbeabd9a281f9a71c2e283df478fb7e3428a7655..a87edfac111f853056e718f646a6624559fe929a 100644 (file)
@@ -248,7 +248,10 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
                        continue;
                }
 
-               rcar_du_encoder_init(rcdu, pdata->type, pdata->output, pdata);
+               ret = rcar_du_encoder_init(rcdu, pdata->type, pdata->output,
+                                          pdata);
+               if (ret < 0)
+                       return ret;
        }
 
        /* Set the possible CRTCs and possible clones. There's always at least