Skip to content

Commit

Permalink
Input: ad7877 - remove redundant spi_set_drvdata
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Dmitry Torokhov committed Sep 20, 2013
1 parent 49e6c57 commit 993c379
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/input/touchscreen/ad7877.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,6 @@ static int ad7877_probe(struct spi_device *spi)
err_free_mem:
input_free_device(input_dev);
kfree(ts);
spi_set_drvdata(spi, NULL);
return err;
}

Expand All @@ -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;
}
Expand Down

0 comments on commit 993c379

Please sign in to comment.