From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] rtc: pcf8563: fix pcf8563_irq error return value
Date: Tue, 09 Sep 2014 14:37:02 +0200 [thread overview]
Message-ID: <3249459.KnxQRYTdsz@wuerfel> (raw)
In-Reply-To: <540DCEB0.6030108@cogentembedded.com>
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>
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 3a6f994c4da8..c2ef0a22ee94 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -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);
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Alessandro Zummo <a.zummo@towertech.it>,
linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com
Subject: [PATCH v3 2/2] rtc: pcf8563: fix pcf8563_irq error return value
Date: Tue, 09 Sep 2014 14:37:02 +0200 [thread overview]
Message-ID: <3249459.KnxQRYTdsz@wuerfel> (raw)
In-Reply-To: <540DCEB0.6030108@cogentembedded.com>
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>
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 3a6f994c4da8..c2ef0a22ee94 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -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);
next prev parent reply other threads:[~2014-09-09 12:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-08 15:26 [PATCHv2] rtc: pcf8563: fix uninitialized use warning Arnd Bergmann
2014-09-08 15:26 ` Arnd Bergmann
2014-09-08 15:43 ` Sergei Shtylyov
2014-09-08 15:43 ` Sergei Shtylyov
2014-09-09 12:36 ` [PATCH v3 1/2] " Arnd Bergmann
2014-09-09 12:36 ` Arnd Bergmann
2014-09-09 12:37 ` Arnd Bergmann [this message]
2014-09-09 12:37 ` [PATCH v3 2/2] rtc: pcf8563: fix pcf8563_irq error return value Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3249459.KnxQRYTdsz@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.