drm/i915: Handle error to get connector state when staging config
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 27 Mar 2015 13:33:51 +0000 (15:33 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 27 Mar 2015 14:06:52 +0000 (15:06 +0100)
The return value of one of the calls to drm_atomic_get_connector_state()
in intel_modeset_stage_output_state() wasn't checked for errors.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 3852cbaf9163781175bb7380441fc9a2497dd110..75955fee6d24b1aaa2b622d5c22704c8241b4c53 100644 (file)
@@ -11985,6 +11985,8 @@ intel_modeset_stage_output_state(struct drm_device *dev,
        for_each_intel_connector(dev, connector) {
                connector_state =
                        drm_atomic_get_connector_state(state, &connector->base);
+               if (IS_ERR(connector_state))
+                       return PTR_ERR(connector_state);
 
                if (connector->new_encoder) {
                        if (connector->new_encoder != connector->encoder)