diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-10-31 10:21:37 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-11-01 19:01:31 -0400 |
commit | 620c50dc0b301f09b85ce27022d8f7420bf14e7f (patch) | |
tree | 451106fca4d9f2fbd1b9a597ba3f024f7261af3e | |
parent | bfd9621259970904b25ad198030275328f09ed46 (diff) |
i2c: thunderx: Remove duplicate NULL check
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>
-rw-r--r-- | drivers/i2c/busses/i2c-thunderx-pcidrv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c index 1a7cad874756..19f8eec38717 100644 --- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c +++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c | |||
@@ -143,8 +143,7 @@ static int thunder_i2c_smbus_setup(struct octeon_i2c *i2c, | |||
143 | 143 | ||
144 | static void thunder_i2c_smbus_remove(struct octeon_i2c *i2c) | 144 | static void thunder_i2c_smbus_remove(struct octeon_i2c *i2c) |
145 | { | 145 | { |
146 | if (i2c->ara) | 146 | i2c_unregister_device(i2c->ara); |
147 | i2c_unregister_device(i2c->ara); | ||
148 | } | 147 | } |
149 | 148 | ||
150 | static int thunder_i2c_probe_pci(struct pci_dev *pdev, | 149 | static int thunder_i2c_probe_pci(struct pci_dev *pdev, |