Commit 58f27d7d authored by Sachin Kamat's avatar Sachin Kamat Committed by Linus Torvalds

drivers/rtc/rtc-vt8500.c: fix return value

Propagate the return value from platform_get_irq() instead of hardcoding.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
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 f16189ac
...@@ -228,7 +228,7 @@ static int vt8500_rtc_probe(struct platform_device *pdev) ...@@ -228,7 +228,7 @@ static int vt8500_rtc_probe(struct platform_device *pdev)
vt8500_rtc->irq_alarm = platform_get_irq(pdev, 0); vt8500_rtc->irq_alarm = platform_get_irq(pdev, 0);
if (vt8500_rtc->irq_alarm < 0) { if (vt8500_rtc->irq_alarm < 0) {
dev_err(&pdev->dev, "No alarm IRQ resource defined\n"); dev_err(&pdev->dev, "No alarm IRQ resource defined\n");
return -ENXIO; return vt8500_rtc->irq_alarm;
} }
vt8500_rtc->res = devm_request_mem_region(&pdev->dev, vt8500_rtc->res = devm_request_mem_region(&pdev->dev,
......
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