Commit 2fa76062 authored by Sachin Kamat's avatar Sachin Kamat Committed by Linus Torvalds

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: default avatarSachin 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ad819039
...@@ -200,23 +200,16 @@ static int max8907_rtc_probe(struct platform_device *pdev) ...@@ -200,23 +200,16 @@ static int max8907_rtc_probe(struct platform_device *pdev)
rtc->irq = regmap_irq_get_virq(max8907->irqc_rtc, rtc->irq = regmap_irq_get_virq(max8907->irqc_rtc,
MAX8907_IRQ_RTC_ALARM0); MAX8907_IRQ_RTC_ALARM0);
if (rtc->irq < 0) { if (rtc->irq < 0)
ret = rtc->irq; return rtc->irq;
goto err_unregister;
}
ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL,
max8907_irq_handler, max8907_irq_handler,
IRQF_ONESHOT, "max8907-alarm0", rtc); IRQF_ONESHOT, "max8907-alarm0", rtc);
if (ret < 0) { if (ret < 0)
dev_err(&pdev->dev, "Failed to request IRQ%d: %d\n", dev_err(&pdev->dev, "Failed to request IRQ%d: %d\n",
rtc->irq, ret); rtc->irq, ret);
goto err_unregister;
}
return 0;
err_unregister:
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment