gpio: gpio-mc33880: Remove redundant spi_set_drvdata
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 19 Sep 2013 12:00:53 +0000 (17:30 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 23 Sep 2013 10:53:13 +0000 (12:53 +0200)
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mc33880.c

index 3fd2caa4a2e02fd05a71022a522c51add55f5e66..c0b7835f513687fe8f0922ea1aaecc7e2e2ded91 100644 (file)
@@ -142,7 +142,6 @@ static int mc33880_probe(struct spi_device *spi)
        return ret;
 
 exit_destroy:
-       spi_set_drvdata(spi, NULL);
        mutex_destroy(&mc->lock);
        return ret;
 }
@@ -156,8 +155,6 @@ static int mc33880_remove(struct spi_device *spi)
        if (mc == NULL)
                return -ENODEV;
 
-       spi_set_drvdata(spi, NULL);
-
        ret = gpiochip_remove(&mc->chip);
        if (!ret)
                mutex_destroy(&mc->lock);