Message ID | 20171031142149.32512-3-andriy.shevchenko@linux.intel.com |
---|---|
State | Accepted |
Headers | show |
Series | [v1,01/15] i2c: Make i2c_unregister_device() NULL-aware | expand |
On Tue, Oct 31, 2017 at 04:21:37PM +0200, Andy Shevchenko wrote: > Since i2c_unregister_device() became NULL-aware we may remove duplicate > NULL check. > > Cc: Jan Glauber <jglauber@cavium.com> > Cc: David Daney <david.daney@cavium.com> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Applied to for-next, thanks!
diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c index df0976f4432a..61866646ae8e 100644 --- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c +++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c @@ -149,8 +149,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,
Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Jan Glauber <jglauber@cavium.com> Cc: David Daney <david.daney@cavium.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/i2c/busses/i2c-thunderx-pcidrv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)