From: Andy Shevchenko Date: Tue, 31 Oct 2017 14:21:37 +0000 (+0200) Subject: i2c: thunderx: Remove duplicate NULL check X-Git-Tag: v4.15~425^2~5 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=620c50dc0b301f09b85ce27022d8f7420bf14e7f;p=mirror_ubuntu-bionic-kernel.git i2c: thunderx: Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang --- 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,