drm/bridge: analogix-anx78xx: Remove duplicate NULL check
authorAndy Shevchenko <[email protected]>
Tue, 31 Oct 2017 14:21:40 +0000 (16:21 +0200)
committerVille Syrjälä <[email protected]>
Thu, 18 Jan 2018 14:24:29 +0000 (16:24 +0200)
Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.

Cc: Archit Taneja <[email protected]>
Cc: Andrzej Hajda <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
Signed-off-by: Andy Shevchenko <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Ville Syrjälä <[email protected]>
drivers/gpu/drm/bridge/analogix-anx78xx.c

index ed12a7ddd64aee41b607c36166454eedda235637..b49043866be612019993b058ce2fbbc53b03ac63 100644 (file)
@@ -1301,8 +1301,7 @@ static void unregister_i2c_dummy_clients(struct anx78xx *anx78xx)
        unsigned int i;
 
        for (i = 0; i < ARRAY_SIZE(anx78xx->i2c_dummy); i++)
-               if (anx78xx->i2c_dummy[i])
-                       i2c_unregister_device(anx78xx->i2c_dummy[i]);
+               i2c_unregister_device(anx78xx->i2c_dummy[i]);
 }
 
 static const struct regmap_config anx78xx_regmap_config = {