aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-max8997.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-29 19:20:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:34 -0400
commit406dc00407edfa75c97123c7f8653e850358fb72 (patch)
treef8a8c8f43b1f134f970752f9b1ff5d0af2b53a89 /drivers/rtc/rtc-max8997.c
parentdbda161be8ae43133bbeac34da3ad99ffeb63556 (diff)
drivers/rtc/rtc-max8997.c: fix incorrect return value on error
'ret' was being returned without initializing it to error code. While at it also remove duplicate return statement. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Jonghwa Lee <jonghwa3.lee@samsung.com> Cc: Chiwoong Byun <woong.byun@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-max8997.c')
-rw-r--r--drivers/rtc/rtc-max8997.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c
index d12acc49c822..5693619614f4 100644
--- a/drivers/rtc/rtc-max8997.c
+++ b/drivers/rtc/rtc-max8997.c
@@ -491,6 +491,7 @@ static int max8997_rtc_probe(struct platform_device *pdev)
491 virq = irq_create_mapping(max8997->irq_domain, MAX8997_PMICIRQ_RTCA1); 491 virq = irq_create_mapping(max8997->irq_domain, MAX8997_PMICIRQ_RTCA1);
492 if (!virq) { 492 if (!virq) {
493 dev_err(&pdev->dev, "Failed to create mapping alarm IRQ\n"); 493 dev_err(&pdev->dev, "Failed to create mapping alarm IRQ\n");
494 ret = -ENXIO;
494 goto err_out; 495 goto err_out;
495 } 496 }
496 info->virq = virq; 497 info->virq = virq;
@@ -498,13 +499,9 @@ static int max8997_rtc_probe(struct platform_device *pdev)
498 ret = devm_request_threaded_irq(&pdev->dev, virq, NULL, 499 ret = devm_request_threaded_irq(&pdev->dev, virq, NULL,
499 max8997_rtc_alarm_irq, 0, 500 max8997_rtc_alarm_irq, 0,
500 "rtc-alarm0", info); 501 "rtc-alarm0", info);
501 if (ret < 0) { 502 if (ret < 0)
502 dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", 503 dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
503 info->virq, ret); 504 info->virq, ret);
504 goto err_out;
505 }
506
507 return ret;
508 505
509err_out: 506err_out:
510 return ret; 507 return ret;