From b8f26ad4f783d438bbd119ab4e1b791ee8e4d5c5 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Mon, 29 Apr 2013 16:20:10 -0700 Subject: [PATCH] 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 Acked-by: Venu Byravarasu Cc: Chiwoong Byun Cc: Jonghwa Lee Cc: Laxman dewangan Cc: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/rtc-tps65910.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index 26b8bd2527691..a9caf043b0ce8 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) if (irq <= 0) { dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n", irq); - return ret; + return -ENXIO; } ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, -- 2.39.5