video: backlight: tosa_lcd: drop check because i2c_unregister_device() is NULL safe

No need to check the argument of i2c_unregister_device() because the
function itself does it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Wolfram Sang 2019-08-20 17:34:39 +02:00 committed by Lee Jones
parent bcd69da98e
commit 28a1d72a22

View file

@ -222,8 +222,7 @@ static int tosa_lcd_remove(struct spi_device *spi)
{
struct tosa_lcd_data *data = spi_get_drvdata(spi);
if (data->i2c)
i2c_unregister_device(data->i2c);
i2c_unregister_device(data->i2c);
tosa_lcd_tg_off(data);