Merge branch 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm into...
[platform/kernel/linux-starfive.git] / drivers / gpu / drm / i2c / tda998x_drv.c
index eb9916b..6ebd884 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)