Merge remote-tracking branch 'drm/drm-next' into drm-misc-next-fixes
[linux-2.6-microblaze.git] / drivers / gpu / drm / bridge / ti-tfp410.c
index bfb21b5..4e76b2b 100644 (file)
@@ -70,7 +70,12 @@ static int tfp410_get_modes(struct drm_connector *connector)
 
        drm_connector_update_edid_property(connector, edid);
 
-       return drm_add_edid_modes(connector, edid);
+       ret = drm_add_edid_modes(connector, edid);
+
+       kfree(edid);
+
+       return ret;
+
 fallback:
        /* No EDID, fallback on the XGA standard modes */
        ret = drm_add_modes_noedid(connector, 1920, 1200);
@@ -376,7 +381,8 @@ static int tfp410_fini(struct device *dev)
 {
        struct tfp410 *dvi = dev_get_drvdata(dev);
 
-       cancel_delayed_work_sync(&dvi->hpd_work);
+       if (dvi->hpd_irq >= 0)
+               cancel_delayed_work_sync(&dvi->hpd_work);
 
        drm_bridge_remove(&dvi->bridge);