提交 bfd96212 编写于 作者: A Andy Shevchenko 提交者: Wolfram Sang

i2c: taos-evm: Remove duplicate NULL check

Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: NJean Delvare <jdelvare@suse.de>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 7b43dd19
...@@ -282,8 +282,7 @@ static void taos_disconnect(struct serio *serio) ...@@ -282,8 +282,7 @@ static void taos_disconnect(struct serio *serio)
{ {
struct taos_data *taos = serio_get_drvdata(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); i2c_del_adapter(&taos->adapter);
serio_close(serio); serio_close(serio);
kfree(taos); kfree(taos);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册