summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/tosa_lcd.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-08-20 17:34:39 +0200
committerLee Jones <lee.jones@linaro.org>2019-09-02 15:54:47 +0100
commit28a1d72a221ecdf8f63205d40cb654c81a2b2da7 (patch)
tree5dfc6abba6af1b312e764726dce714e52a5ff776 /drivers/video/backlight/tosa_lcd.c
parentbcd69da98e36afccb4cb5fbdbd2b7bb78c07184d (diff)
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>
Diffstat (limited to 'drivers/video/backlight/tosa_lcd.c')
-rw-r--r--drivers/video/backlight/tosa_lcd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c
index 65cb7578776f..29af8e27b6e5 100644
--- a/drivers/video/backlight/tosa_lcd.c
+++ b/drivers/video/backlight/tosa_lcd.c
@@ -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);