aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-max77686.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-29 19:20:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:34 -0400
commitad819039f1aa5c5179ecdfb035ed2864d93e741e (patch)
treeb430ceecc888867d9fa00165beb47b5b3a3e621c /drivers/rtc/rtc-max77686.c
parent406dc00407edfa75c97123c7f8653e850358fb72 (diff)
drivers/rtc/rtc-max77686.c: fix incorrect return value on error
'ret' was not initialized to error code before returning. While at it also remove some redundant code and cleanup. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Chiwoong Byun <woong.byun@samsung.com> Cc: Jonghwa Lee <jonghwa3.lee@samsung.com> Cc: Laxman dewangan <ldewangan@nvidia.com> Cc: Venu Byravarasu <vbyravarasu@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>
Diffstat (limited to 'drivers/rtc/rtc-max77686.c')
-rw-r--r--drivers/rtc/rtc-max77686.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 5a12b32f77ec..fb08b89c41e7 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -551,17 +551,17 @@ static int max77686_rtc_probe(struct platform_device *pdev)
551 goto err_rtc; 551 goto err_rtc;
552 } 552 }
553 virq = irq_create_mapping(max77686->irq_domain, MAX77686_RTCIRQ_RTCA1); 553 virq = irq_create_mapping(max77686->irq_domain, MAX77686_RTCIRQ_RTCA1);
554 if (!virq) 554 if (!virq) {
555 ret = -ENXIO;
555 goto err_rtc; 556 goto err_rtc;
557 }
556 info->virq = virq; 558 info->virq = virq;
557 559
558 ret = devm_request_threaded_irq(&pdev->dev, virq, NULL, 560 ret = devm_request_threaded_irq(&pdev->dev, virq, NULL,
559 max77686_rtc_alarm_irq, 0, "rtc-alarm0", info); 561 max77686_rtc_alarm_irq, 0, "rtc-alarm0", info);
560 if (ret < 0) { 562 if (ret < 0)
561 dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", 563 dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
562 info->virq, ret); 564 info->virq, ret);
563 goto err_rtc;
564 }
565 565
566err_rtc: 566err_rtc:
567 return ret; 567 return ret;