udl: handle EDID failure properly.
authorDave Airlie <airlied@gmail.com>
Fri, 12 Apr 2013 03:25:20 +0000 (13:25 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 12 Apr 2013 04:20:38 +0000 (14:20 +1000)
Don't oops seems proper.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/udl/udl_connector.c

index fe5cdbc..b44d548 100644 (file)
@@ -61,6 +61,10 @@ static int udl_get_modes(struct drm_connector *connector)
        int ret;
 
        edid = (struct edid *)udl_get_edid(udl);
+       if (!edid) {
+               drm_mode_connector_update_edid_property(connector, NULL);
+               return 0;
+       }
 
        /*
         * We only read the main block, but if the monitor reports extension