drm/i2c/sil164: Remove duplicate NULL check
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 31 Oct 2017 14:21:41 +0000 (16:21 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 18 Jan 2018 14:24:38 +0000 (16:24 +0200)
Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.

Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171031142149.32512-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i2c/sil164_drv.c

index ecaa58757529900c2aeca1698406b396239087e3..c52d7a3af786e6c1c0bac8a0a8ab40f72bb998e2 100644 (file)
@@ -326,8 +326,7 @@ sil164_encoder_destroy(struct drm_encoder *encoder)
 {
        struct sil164_priv *priv = to_sil164_priv(encoder);
 
-       if (priv->duallink_slave)
-               i2c_unregister_device(priv->duallink_slave);
+       i2c_unregister_device(priv->duallink_slave);
 
        kfree(priv);
        drm_i2c_encoder_destroy(encoder);