From patchwork Tue Sep 6 12:56:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9316651 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 8C1EB607D3 for ; Tue, 6 Sep 2016 12:57:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E5DB28D09 for ; Tue, 6 Sep 2016 12:57:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72D3E28D0D; Tue, 6 Sep 2016 12:57: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=-4.5 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 4721928D09 for ; Tue, 6 Sep 2016 12:57:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934785AbcIFM5B (ORCPT ); Tue, 6 Sep 2016 08:57:01 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:57612 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933143AbcIFM5B (ORCPT ); Tue, 6 Sep 2016 08:57:01 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MFzpm-1bskdi2t1i-00Esul; Tue, 06 Sep 2016 14:56:00 +0200 From: Arnd Bergmann To: Ulf Hansson Cc: Arnd Bergmann , David Lechner , Peter Ujfalusi , Jaehoon Chung , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: davinci: remove incorrect NO_IRQ use Date: Tue, 6 Sep 2016 14:56:09 +0200 Message-Id: <20160906125633.1563621-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:FKCtJNgkR9eLHKwjuFcKwCZnionmO/Nz3bDheN6HdaofCmE2CDx avLbuyY5h+JPG7RBqFN7I9oO1yl5wV2MFPLROI0lCXNRdQ2KTiGB2a5aoFNB7oqZA4mN3vW LnSMR09zh8H3HC89l+MROPb8TAqWNnTUkiI8eu9Nil26kvKzcbqDurE38SA8s8RzomDjv5e A187dFbHNxKe7OYf5J75w== X-UI-Out-Filterresults: notjunk:1; V01:K0:Gr4glNhuCW0=:hGBJoSu2gJw8fkymjsJe6b udg73/yO88uoC567o2W7+dA9bDsbDuIt6D/53O36vfVoV2qfmkV6lKiOpTFSw8D1625efH46r 1Nu6JYI8FOe6LvX2K5qcAHSmSlQu+Z17ppPCkoglKVtysaXMWh9Gcdp0v2Tb5j/J7VKTKcKPY 9aD2SEeobvo3v+D0yNx+iXNodUMvfi2wfDHwIOhJmHZAoJtB6o1zVr0pGk7ut5rN5Qm1VnvZC OGGrQd39l7fr/0/b3yVTP6q5TTDdBAWZpm+kIK65t/cKOt68XYRuWXpUorxmTOtT9DTCn1b+D 52xHB3lwQydZwYD5oN3rfUQbQ/I9jWk8tTRaQrBJTK4v1rdLvdGKbR+vSwpLpGyCvzAlgxkA6 8lRWsZXcAi+wLKvz5UqBz7OQjfSYiz8a+VznbFbbn0j5flHeJkJZhw2NOfrXKGZHxLb8Jw61I Uaa+24ZZ8da2xKTi/Kj8z94gPwBpReEiwMkdfO597cKCFiceLLtAZabD6qmy7Jtz5S1uH5VLk XXO64fWBE0WuZpkn+e7xwXjrBa96mpOoooAqpuoxHeHoAi/A/T3oPGifg3Ca1byQCLY0NSZ8/ rAJx1ZMPE1cBxs3o1qx0eiEe1R39FL2Fsacns0bh91GjOZuX3k6W62pgm0Hka5YDGxUFDp2zj 4WU5ZsjDJwG2uSbMDmLELMiQFZDn1yf+Wu9ZNHVGpHbzQT9kxaR8Zy09gACIRvq6s+wc= Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP platform_get_irq() returns an error value on failure, not NO_IRQ, so the error handling here could never work. This changes the code to propagate the error value instead. Signed-off-by: Arnd Bergmann --- drivers/mmc/host/davinci_mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index c521559412fc..67ef4810b3de 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1216,9 +1216,11 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev) } r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - irq = platform_get_irq(pdev, 0); - if (!r || irq == NO_IRQ) + if (!r) return -ENODEV; + irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; mem_size = resource_size(r); mem = devm_request_mem_region(&pdev->dev, r->start, mem_size,