summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-29 16:20:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:28:34 -0700
commit2fa76062bbff17fbc462c290ba9fe22cf23a4710 (patch)
tree8cbd835c823de9d9308b5c2f36d5e8de40e8dc01
parentad819039f1aa5c5179ecdfb035ed2864d93e741e (diff)
downloadop-kernel-dev-2fa76062bbff17fbc462c290ba9fe22cf23a4710.zip
op-kernel-dev-2fa76062bbff17fbc462c290ba9fe22cf23a4710.tar.gz
drivers/rtc/rtc-max8907.c: remove redundant code
Remove unnecessary goto statements to simplify the code. devm_request_threaded_irq returns 0 upon success, hence explicit return 0 is not necessary. 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>
-rw-r--r--drivers/rtc/rtc-max8907.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-max8907.c b/drivers/rtc/rtc-max8907.c
index 9d62cdb..86afb79 100644
--- a/drivers/rtc/rtc-max8907.c
+++ b/drivers/rtc/rtc-max8907.c
@@ -200,23 +200,16 @@ static int max8907_rtc_probe(struct platform_device *pdev)
rtc->irq = regmap_irq_get_virq(max8907->irqc_rtc,
MAX8907_IRQ_RTC_ALARM0);
- if (rtc->irq < 0) {
- ret = rtc->irq;
- goto err_unregister;
- }
+ if (rtc->irq < 0)
+ return rtc->irq;
ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL,
max8907_irq_handler,
IRQF_ONESHOT, "max8907-alarm0", rtc);
- if (ret < 0) {
+ if (ret < 0)
dev_err(&pdev->dev, "Failed to request IRQ%d: %d\n",
rtc->irq, ret);
- goto err_unregister;
- }
-
- return 0;
-err_unregister:
return ret;
}
OpenPOWER on IntegriCloud