Skip to content

Commit 3ff3823

Browse files
arndbtorvalds
authored andcommitted
drivers/rtc/rtc-pcf8563.c: fix pcf8563_irq() error return value
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>
1 parent e698a51 commit 3ff3823

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/rtc/rtc-pcf8563.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static irqreturn_t pcf8563_irq(int irq, void *dev_id)
168168

169169
err = pcf8563_get_alarm_mode(pcf8563->client, NULL, &pending);
170170
if (err)
171-
return err;
171+
return IRQ_NONE;
172172

173173
if (pending) {
174174
rtc_update_irq(pcf8563->rtc, 1, RTC_IRQF | RTC_AF);

0 commit comments

Comments
 (0)