backlight: tosa: Remove redundant spi_set_drvdata
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 20 Sep 2013 06:38:53 +0000 (12:08 +0530)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 26 Sep 2013 08:47:27 +0000 (11:47 +0300)
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/backlight/tosa_lcd.c

index bf081573e5b5938c7084c8d2206baa2512ff460f..be5d636764bf4bc9b8eec7417c0730dea0914e26 100644 (file)
@@ -198,7 +198,7 @@ static int tosa_lcd_probe(struct spi_device *spi)
        ret = devm_gpio_request_one(&spi->dev, TOSA_GPIO_TG_ON,
                                GPIOF_OUT_INIT_LOW, "tg #pwr");
        if (ret < 0)
-               goto err_gpio_tg;
+               return ret;
 
        mdelay(60);
 
@@ -219,8 +219,6 @@ static int tosa_lcd_probe(struct spi_device *spi)
 
 err_register:
        tosa_lcd_tg_off(data);
-err_gpio_tg:
-       spi_set_drvdata(spi, NULL);
        return ret;
 }
 
@@ -235,8 +233,6 @@ static int tosa_lcd_remove(struct spi_device *spi)
 
        tosa_lcd_tg_off(data);
 
-       spi_set_drvdata(spi, NULL);
-
        return 0;
 }