Skip to content

Commit

Permalink
ipmi_ssif: Remove duplicate NULL check
Browse files Browse the repository at this point in the history
Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.

Cc: Corey Minyard <minyard@acm.org>
Cc: openipmi-developer@lists.sourceforge.net
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
  • Loading branch information
Andy Shevchenko authored and Corey Minyard committed Jan 22, 2018
1 parent e749d32 commit e45af3d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/char/ipmi/ipmi_ssif.c
Original file line number Diff line number Diff line change
Expand Up @@ -2071,8 +2071,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);
Expand Down

0 comments on commit e45af3d

Please sign in to comment.