diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-10-31 17:21:37 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-11-02 02:01:31 +0300 |
commit | 620c50dc0b301f09b85ce27022d8f7420bf14e7f (patch) | |
tree | 451106fca4d9f2fbd1b9a597ba3f024f7261af3e /drivers/i2c/busses/i2c-thunderx-pcidrv.c | |
parent | bfd9621259970904b25ad198030275328f09ed46 (diff) | |
download | linux-620c50dc0b301f09b85ce27022d8f7420bf14e7f.tar.xz |
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>
Diffstat (limited to 'drivers/i2c/busses/i2c-thunderx-pcidrv.c')
-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, 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, |