gpio: max730x: Remove redundant dev_set_drvdata
authorSachin Kamat <sachin.kamat@linaro.org>
Sat, 21 Dec 2013 07:25:38 +0000 (12:55 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 2 Jan 2014 12:54:34 +0000 (13:54 +0100)
Driver core sets it to NULL upon probe failure or release.

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

index 89226a36b08c9d31bdd4951e811bf88a53c1643d..8672755f95c915a2ae2977678c51e554f616ae3f 100644 (file)
@@ -220,7 +220,6 @@ int __max730x_probe(struct max7301 *ts)
        return ret;
 
 exit_destroy:
-       dev_set_drvdata(dev, NULL);
        mutex_destroy(&ts->lock);
        return ret;
 }
@@ -234,8 +233,6 @@ int __max730x_remove(struct device *dev)
        if (ts == NULL)
                return -ENODEV;
 
-       dev_set_drvdata(dev, NULL);
-
        /* Power down the chip and disable IRQ output */
        ts->write(dev, 0x04, 0x00);