From: Andy Shevchenko Date: Tue, 31 Oct 2017 14:21:42 +0000 (+0200) Subject: drm/i2c: tda998x: Remove duplicate NULL check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e1ca774b3e06228ad75a2e4afc7f3a4cb45eef64;p=openwrt%2Fstaging%2Fblogic.git drm/i2c: tda998x: Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Russell King Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: Andy Shevchenko Link: https://patchwork.freedesktop.org/patch/msgid/20171031142149.32512-8-andriy.shevchenko@linux.intel.com Acked-by: Russell King Signed-off-by: Ville Syrjälä --- diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index cd3f0873bbdd..9e67a7b4e3a4 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1600,8 +1600,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); return -ENXIO; }