aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-max8907.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-29 19:20:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:34 -0400
commit2fa76062bbff17fbc462c290ba9fe22cf23a4710 (patch)
tree8cbd835c823de9d9308b5c2f36d5e8de40e8dc01 /drivers/rtc/rtc-max8907.c
parentad819039f1aa5c5179ecdfb035ed2864d93e741e (diff)
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>
Diffstat (limited to 'drivers/rtc/rtc-max8907.c')
-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 9d62cdb83d11..86afb797125d 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)
200 200
201 rtc->irq = regmap_irq_get_virq(max8907->irqc_rtc, 201 rtc->irq = regmap_irq_get_virq(max8907->irqc_rtc,
202 MAX8907_IRQ_RTC_ALARM0); 202 MAX8907_IRQ_RTC_ALARM0);
203 if (rtc->irq < 0) { 203 if (rtc->irq < 0)
204 ret = rtc->irq; 204 return rtc->irq;
205 goto err_unregister;
206 }
207 205
208 ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, 206 ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL,
209 max8907_irq_handler, 207 max8907_irq_handler,
210 IRQF_ONESHOT, "max8907-alarm0", rtc); 208 IRQF_ONESHOT, "max8907-alarm0", rtc);
211 if (ret < 0) { 209 if (ret < 0)
212 dev_err(&pdev->dev, "Failed to request IRQ%d: %d\n", 210 dev_err(&pdev->dev, "Failed to request IRQ%d: %d\n",
213 rtc->irq, ret); 211 rtc->irq, ret);
214 goto err_unregister;
215 }
216
217 return 0;
218 212
219err_unregister:
220 return ret; 213 return ret;
221} 214}
222 215