Input: ad7877 - remove redundant spi_set_drvdata
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 20 Sep 2013 16:38:05 +0000 (09:38 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 20 Sep 2013 16:58:27 +0000 (09:58 -0700)
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/ad7877.c

index f3a174a83c82ced113c265ba1b1601774f23e765..69834dd3c313b95dcab54dcd23d51a6730727868 100644 (file)
@@ -806,7 +806,6 @@ err_free_irq:
 err_free_mem:
        input_free_device(input_dev);
        kfree(ts);
-       spi_set_drvdata(spi, NULL);
        return err;
 }
 
@@ -823,7 +822,6 @@ static int ad7877_remove(struct spi_device *spi)
        kfree(ts);
 
        dev_dbg(&spi->dev, "unregistered touchscreen\n");
-       spi_set_drvdata(spi, NULL);
 
        return 0;
 }