Patchwork [v2,1/5] drivers/rtc/rtc-tps6586x.c: Remove incorrect use of rtc_device_unregister

login
register
mail settings
Submitter Sachin Kamat
Date March 26, 2013, 4:12 a.m.
Message ID <1364271162-18141-2-git-send-email-sachin.kamat@linaro.org>
Download mbox | patch
Permalink /patch/231073/
State New
Headers show

Comments

Sachin Kamat - March 26, 2013, 4:12 a.m.
Device managed functions do not need explicit freeing/unregistering.
Moreover in this case it was done using non-device managed
function which is incorrect. Hence remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Laxman dewangan <ldewangan@nvidia.com>
---
 drivers/rtc/rtc-tps6586x.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

Patch

diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c
index badfea4..459c2ff 100644
--- a/drivers/rtc/rtc-tps6586x.c
+++ b/drivers/rtc/rtc-tps6586x.c
@@ -289,15 +289,12 @@  static int tps6586x_rtc_probe(struct platform_device *pdev)
 	if (ret < 0) {
 		dev_err(&pdev->dev, "request IRQ(%d) failed with ret %d\n",
 				rtc->irq, ret);
-		goto fail_req_irq;
+		goto fail_rtc_register;
 	}
 	disable_irq(rtc->irq);
 	device_set_wakeup_capable(&pdev->dev, 1);
 	return 0;
 
-fail_req_irq:
-	rtc_device_unregister(rtc->rtc);
-
 fail_rtc_register:
 	tps6586x_update(tps_dev, RTC_CTRL, 0,
 		RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);