]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-at32ap700x.c
rtc: bunch of drivers: fix 'no irq' case handing
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-at32ap700x.c
index 90b9a6503e1561d2576dbb4ab74bd830bc40e4b4..e1ec33e40e388d229d55b27cc78e79275951da0e 100644 (file)
@@ -205,7 +205,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
 {
        struct resource *regs;
        struct rtc_at32ap700x *rtc;
-       int irq = -1;
+       int irq;
        int ret;
 
        rtc = kzalloc(sizeof(struct rtc_at32ap700x), GFP_KERNEL);
@@ -222,7 +222,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
        }
 
        irq = platform_get_irq(pdev, 0);
-       if (irq < 0) {
+       if (irq <= 0) {
                dev_dbg(&pdev->dev, "could not get irq\n");
                ret = -ENXIO;
                goto out;