drivers/rtc/rtc-vt8500.c: fix return value
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 12 Nov 2013 23:10:28 +0000 (15:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:27 +0000 (12:09 +0900)
Propagate the return value from platform_get_irq() instead of hardcoding.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
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>
drivers/rtc/rtc-vt8500.c

index c2d6331fc712c7244a87d33ef1e2d6d3cfa7fdca..5be217df1d755810be2944bf0a8c4f2d8c21211f 100644 (file)
@@ -228,7 +228,7 @@ static int vt8500_rtc_probe(struct platform_device *pdev)
        vt8500_rtc->irq_alarm = platform_get_irq(pdev, 0);
        if (vt8500_rtc->irq_alarm < 0) {
                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,