On Tue, 2017-10-31 at 16:21 +0200, Andy Shevchenko wrote: > Since i2c_unregister_device() became NULL-aware we may remove > duplicate > NULL check. Anyone? Wolfram, I think if no one picks this soon it's quite safe to push it through i2c tree. > Cc: Corey Minyard <minyard@xxxxxxx> > Cc: openipmi-developer@xxxxxxxxxxxxxxxxxxxxx > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > --- > drivers/char/ipmi/ipmi_ssif.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/char/ipmi/ipmi_ssif.c > b/drivers/char/ipmi/ipmi_ssif.c > index 466b3a1c0adf..8d183e182eab 100644 > --- a/drivers/char/ipmi/ipmi_ssif.c > +++ b/drivers/char/ipmi/ipmi_ssif.c > @@ -2072,8 +2072,7 @@ static int ssif_platform_remove(struct > platform_device *dev) > return 0; > > mutex_lock(&ssif_infos_mutex); > - if (addr_info->client) > - i2c_unregister_device(addr_info->client); > + i2c_unregister_device(addr_info->client); > > list_del(&addr_info->link); > kfree(addr_info); -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Intel Finland Oy