Patchwork [09/10] drivers/rtc/rtc-mrst.c: Remove redundant dev_set_drvdata

login
register
mail settings
Submitter Sachin Kamat
Date Sept. 6, 2013, 11:33 a.m.
Message ID <1378467223-26231-9-git-send-email-sachin.kamat@linaro.org>
Download mbox | patch
Permalink /patch/273161/
State New
Headers show

Comments

Sachin Kamat - Sept. 6, 2013, 11:33 a.m.
Driver core sets the driver data to NULL upon device_release
or on probe failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/rtc/rtc-mrst.c |    2 --
 1 file changed, 2 deletions(-)

Patch

diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 578baf9..ddd75bb 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -380,7 +380,6 @@  static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem,
 cleanup1:
 	rtc_device_unregister(mrst_rtc.rtc);
 cleanup0:
-	dev_set_drvdata(dev, NULL);
 	mrst_rtc.dev = NULL;
 	release_mem_region(iomem->start, resource_size(iomem));
 	dev_err(dev, "rtc-mrst: unable to initialise\n");
@@ -412,7 +411,6 @@  static void rtc_mrst_do_remove(struct device *dev)
 	mrst->iomem = NULL;
 
 	mrst->dev = NULL;
-	dev_set_drvdata(dev, NULL);
 }
 
 #ifdef	CONFIG_PM