aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-29 19:20:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:33 -0400
commitdbda161be8ae43133bbeac34da3ad99ffeb63556 (patch)
treef7c15021e8cf39c6c6d7bcd6de681b29d06e6032
parentad3f3cf489311af25f91bade664a1688896245e9 (diff)
drivers/rtc/rtc-tps65910.c: fix incorrect return value on error
'ret' was not initialized to correct error value before returning. Since 'irq' is also being tested for 0, we cannot return irq itself as it means function is success even though we are returning before completing the probe. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com> Cc: Chiwoong Byun <woong.byun@samsung.com> Cc: Jonghwa Lee <jonghwa3.lee@samsung.com> Cc: Laxman dewangan <ldewangan@nvidia.com> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/rtc/rtc-tps65910.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 26b8bd252769..a9caf043b0ce 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -263,7 +263,7 @@ static int tps65910_rtc_probe(struct platform_device *pdev)
263 if (irq <= 0) { 263 if (irq <= 0) {
264 dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n", 264 dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n",
265 irq); 265 irq);
266 return ret; 266 return -ENXIO;
267 } 267 }
268 268
269 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, 269 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,