Merge branch 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm into...
[sfrench/cifs-2.6.git] / drivers / gpu / drm / i2c / tda998x_drv.c
index eb9916bd84a49db9b62bdc182f4a06523329bc14..6ebd8842dbcc8649c887d689becf69e017f5146b 100644 (file)
@@ -1242,7 +1242,7 @@ static int tda998x_connector_get_modes(struct drm_connector *connector)
        return n;
 }
 
-static int tda998x_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status tda998x_connector_mode_valid(struct drm_connector *connector,
                                        struct drm_display_mode *mode)
 {
        /* TDA19988 dotclock can go up to 165MHz */
@@ -1783,8 +1783,7 @@ fail:
        /* if encoder_init fails, the encoder slave is never registered,
         * so cleanup here:
         */
-       if (priv->cec)
-               i2c_unregister_device(priv->cec);
+       i2c_unregister_device(priv->cec);
        if (priv->cec_notify)
                cec_notifier_put(priv->cec_notify);
        if (client->irq)