mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
i2c: taos-evm: 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> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
7b43dd19c9
commit
bfd9621259
@ -282,8 +282,7 @@ static void taos_disconnect(struct serio *serio)
|
||||
{
|
||||
struct taos_data *taos = serio_get_drvdata(serio);
|
||||
|
||||
if (taos->client)
|
||||
i2c_unregister_device(taos->client);
|
||||
i2c_unregister_device(taos->client);
|
||||
i2c_del_adapter(&taos->adapter);
|
||||
serio_close(serio);
|
||||
kfree(taos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user