From patchwork Fri Sep 2 23:17:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9311775 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 710E7607D2 for ; Fri, 2 Sep 2016 23:18:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D7C829881 for ; Fri, 2 Sep 2016 23:18:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4213929884; Fri, 2 Sep 2016 23:18:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6EF229881 for ; Fri, 2 Sep 2016 23:18:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753428AbcIBXSB (ORCPT ); Fri, 2 Sep 2016 19:18:01 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:52441 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752879AbcIBXSA (ORCPT ); Fri, 2 Sep 2016 19:18:00 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MDxZH-1brpxX2u5v-00HLnP; Sat, 03 Sep 2016 01:17:20 +0200 From: Arnd Bergmann To: Vinod Koul , Barry Song Cc: Arnd Bergmann , Dan Williams , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: sirf: fix irq number error check Date: Sat, 3 Sep 2016 01:17:20 +0200 Message-Id: <20160902231737.1721916-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:HkgBEMWcza4vsWf9Pu6uEdVimd7pixAplZP2l7jQOVeKvFB+0z5 uVKMjvEemqtNw54MFiYSRmZ07FEM0/8PEunTaI5Vj7BKqCndO3RlfMZANcLU906CMlCOwNe BrqaZGmN9siF+rHF63SG8IC1B/19WXi0W59ELoXKGW/4s2k3rd3o8g5xTCEkjEmsQevZm7u kR7Z9Q0CZWxWQQzHihoNA== X-UI-Out-Filterresults: notjunk:1; V01:K0:qEoR1RY0uZ4=:qYJ6hHvLVbhnKE+xKsCWn7 PAgZP+ceJjRM4Rk4PmLzc45jO4tZ/5+3YeSbzi/XcTz2a/RLO6NYjuhG0TKJ3YxdpM+TP7QD0 WXe42J7d9POfAtVi1RxSYsynmrmS/h9iqoJs2SocYPRerYuvvxFlnhXrtBpLAbkTRMDxHn1F0 1iRDniHmfv7+p4BHb2zgJ7Re57XrfBxxtmlcSkp1K9Y2kZmwvG4398Tf2xmSg/LGqC/ODz1+f DeWVoNemtPR4yIRkWrR3tTJycqpVfQZz6H7mpSKHz5lTSCWR3oLiHbSCEkhhMDZPiLQl7pWSB 01jU6lb9bbJHwHE3SFt/CHVxRMY8uGR7kbrNCq97vAy9zNWdzJRFRrVo+QRCZwUmsJ3Q/Ql24 npGzy6QRJ02Q4l0AJSPQybU+d2Fct/6eGt/+LvGG5HBlqQ3+gZGsVFzMR7AQtx7suoNgBM2s/ B8McikY81mCE2vZ8qva5wa1Kre1HrxxenqeD/UYd/k4qUlV/Kb2kVeki1J44JkJEYe6alc5b0 G/JYrlHnOhWMy1cKwj11P7PHL6rWDdM6RZCXOQoSqcBd0eewc96m8x2HLQLksfloiI+ZmMrgF Z6Xl6ECIsbKpwC0mFoeUlmtQaEamRMPjXqJ0uvuzB7n+1DkGWW7X9wJ1oajxo/64oP60MotEj ET+f1KAzSMbw43FvLsQZaRBmomgsdZyXKEiAwZbKIevUyOyjTKlE23GLCLDesoGDQZzg= Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP irq_of_parse_and_map() returns 0 on error, no NO_IRQ, so the failure condition can never be met. This changes the comparison to check for zero instead. Signed-off-by: Arnd Bergmann --- drivers/dma/sirf-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index a96e4a480de5..8f62edad51be 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -866,7 +866,7 @@ static int sirfsoc_dma_probe(struct platform_device *op) } sdma->irq = irq_of_parse_and_map(dn, 0); - if (sdma->irq == NO_IRQ) { + if (!sdma->irq) { dev_err(dev, "Error mapping IRQ!\n"); return -EINVAL; }