Patchwork [1/2] mtd: sst25l: Remove redundant spi_set_drvdata

login
register
mail settings
Submitter Sachin Kamat
Date Oct. 8, 2013, 9:21 a.m.
Message ID <1381224094-14098-1-git-send-email-sachin.kamat@linaro.org>
Download mbox | patch
Permalink /patch/281375/
State New
Headers show

Comments

Sachin Kamat - Oct. 8, 2013, 9:21 a.m.
Driver core will set the driver data to NULL upon detach
or probe failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/devices/sst25l.c |    1 -
 1 file changed, 1 deletion(-)
Brian Norris - Oct. 10, 2013, 12:49 a.m.
On Tue, Oct 08, 2013 at 02:51:33PM +0530, Sachin Kamat wrote:
> Driver core will set the driver data to NULL upon detach
> or probe failure.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Pushed the pair to l2-mtd.git. Thanks!

Brian

Patch

diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index a42f1f0..7cc70db 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -404,7 +404,6 @@  static int sst25l_probe(struct spi_device *spi)
 					data ? data->nr_parts : 0);
 	if (ret) {
 		kfree(flash);
-		spi_set_drvdata(spi, NULL);
 		return -ENODEV;
 	}