i2c: thunderx: Remove duplicate NULL check
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 31 Oct 2017 14:21:37 +0000 (16:21 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 1 Nov 2017 23:01:31 +0000 (00:01 +0100)
Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-thunderx-pcidrv.c

index 1a7cad8..19f8eec 100644 (file)
@@ -143,8 +143,7 @@ static int thunder_i2c_smbus_setup(struct octeon_i2c *i2c,
 
 static void thunder_i2c_smbus_remove(struct octeon_i2c *i2c)
 {
-       if (i2c->ara)
-               i2c_unregister_device(i2c->ara);
+       i2c_unregister_device(i2c->ara);
 }
 
 static int thunder_i2c_probe_pci(struct pci_dev *pdev,