From patchwork Tue Sep 9 12:37:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4869231 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B8272C0338 for ; Tue, 9 Sep 2014 12:39:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A622C20145 for ; Tue, 9 Sep 2014 12:39:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7800520120 for ; Tue, 9 Sep 2014 12:39:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XRKfs-0004fP-8H; Tue, 09 Sep 2014 12:37:32 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XRKfo-0004Zf-Ry for linux-arm-kernel@lists.infradead.org; Tue, 09 Sep 2014 12:37:29 +0000 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue005) with ESMTP (Nemesis) id 0LtjF3-1YPrMg0Ntt-011E5c; Tue, 09 Sep 2014 14:37:03 +0200 From: 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 Message-ID: <3249459.KnxQRYTdsz@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <540DCEB0.6030108@cogentembedded.com> References: <2750370.rlMuFcoBUA@wuerfel> <540DCEB0.6030108@cogentembedded.com> MIME-Version: 1.0 X-Provags-ID: V02:K0:Ft1yMnKVFMZ7PZXALAl4Dv1deR4WPYp9Iy9v8J4mpO+ urd011WR6AwsANiHPhz3XAtiNTz7fL+MGW7WYoYV8ghnlh6EBE xLaS4J1AyZc10B0RQmGLOfAbItiiD+b0FuVsVH/7q73AWtwkft qtFcS6LNLxF/zQo8DLFi2R4csOAMLMDbN3tiVgX5hfurPcs+41 ClEs1zW7HIl/EKOmYXaLI7fSJVtorlcJPeqyxFAxN1SOj3J2MA 1SRFuMAmLvEvLJU/9upvueWP6r1tg/2aGu8KErsSpP60gfdW/6 OEUiqOHqjvgMFuSoaEL99nsoQ1jmm4V4HRHH65yTyGjHlOWtV0 95o1ZoPfC9neZ4l6q1YE= X-UI-Out-Filterresults: notjunk:1; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140909_053729_231165_FF8DD79F X-CRM114-Status: GOOD ( 10.02 ) X-Spam-Score: -1.8 (-) Cc: rtc-linux@googlegroups.com, Alessandro Zummo , linux-kernel@vger.kernel.org, Sergei Shtylyov X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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);