On Tue, 31 Oct 2017 16:21:36 +0200, Andy Shevchenko wrote: > Since i2c_unregister_device() became NULL-aware we may remove duplicate > NULL check. > > Cc: Jean Delvare <jdelvare@xxxxxxxx> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > --- > drivers/i2c/busses/i2c-taos-evm.c | 3 +-- > 1 file changed, 1 insertion(+), 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) > { > 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); Reviewed-by: Jean Delvare <jdelvare@xxxxxxx> -- Jean Delvare SUSE L3 Support