drivers/rtc/rtc-pcf8563.c: fix pcf8563_irq() error return value
authorArnd Bergmann <arnd@arndb.de>
Mon, 13 Oct 2014 22:53:10 +0000 (15:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Oct 2014 00:18:19 +0000 (02:18 +0200)
As pointed out by Sergei Shtylyov, the pcf8563_irq function contains a
bug in the error handling: an interrupt handler is not supposed to
return an errno value but an 'enum irqreturn'.

Let's fix this by returning IRQ_NONE in case of a communication error.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-pcf8563.c

index 3a6f994c4da8b0b501c7c2984c342dfc516ae4e8..c2ef0a22ee94639a0db6d3f1e0334d26947059cb 100644 (file)
@@ -168,7 +168,7 @@ static irqreturn_t pcf8563_irq(int irq, void *dev_id)
 
        err = pcf8563_get_alarm_mode(pcf8563->client, NULL, &pending);
        if (err)
-               return err;
+               return IRQ_NONE;
 
        if (pending) {
                rtc_update_irq(pcf8563->rtc, 1, RTC_IRQF | RTC_AF);