diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-10-31 10:21:36 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-11-01 19:01:21 -0400 |
commit | bfd9621259970904b25ad198030275328f09ed46 (patch) | |
tree | 6e3dfeffccb03bc180fe16d6d0887abd97690cd1 | |
parent | 7b43dd19c9b13a3f5478b9d88a49a5495399ad29 (diff) |
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>
-rw-r--r-- | drivers/i2c/busses/i2c-taos-evm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-taos-evm.c b/drivers/i2c/busses/i2c-taos-evm.c index addd90a8cb59..7c7fc01116a1 100644 --- a/drivers/i2c/busses/i2c-taos-evm.c +++ b/drivers/i2c/busses/i2c-taos-evm.c | |||
@@ -282,8 +282,7 @@ static void taos_disconnect(struct serio *serio) | |||
282 | { | 282 | { |
283 | struct taos_data *taos = serio_get_drvdata(serio); | 283 | struct taos_data *taos = serio_get_drvdata(serio); |
284 | 284 | ||
285 | if (taos->client) | 285 | i2c_unregister_device(taos->client); |
286 | i2c_unregister_device(taos->client); | ||
287 | i2c_del_adapter(&taos->adapter); | 286 | i2c_del_adapter(&taos->adapter); |
288 | serio_close(serio); | 287 | serio_close(serio); |
289 | kfree(taos); | 288 | kfree(taos); |