From patchwork Fri Oct 13 09:29:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 10003933 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 572F2602B3 for ; Fri, 13 Oct 2017 09:26:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AFCB28FA8 for ; Fri, 13 Oct 2017 09:26:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3FCD428FB3; Fri, 13 Oct 2017 09:26:24 +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.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C6EF528FA7 for ; Fri, 13 Oct 2017 09:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=F5ThZivhul0/YmYqtyoavuYCqdiWepvjLLalLQw5rrY=; b=rJO2ToCbcYW0F5 h9aGaJxccSMk3dgCsGATL9wQcopaP3P00hTi1uHHM9YVMrTa1UdYL+gfvVt5xjq9dDgNRQ18KKHP0 /dkaXqJNtaplvFDHYninlSAZ5pGWTLV9R3WNAAg6+f2aP+GeOIJfhF3jFXTtIBlwjXUuO46Ti0bwo YFkSypgYzzNuV9kLDAgoHKJIb42A4KNHsf+TMtiHzvjKKOQyyIkOIfajd7mhR7p9uxIaihgZ4s0/O /hIzO+4fFb9lw7iDBtyiooyj0w2Lb2Yl+4wF+hNQqPFCc5eJvxvzHAor8nO2YZP+6ci0MsMCMbndq 270C9zflDzTM82cx3I5Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e2wED-0000kW-4I; Fri, 13 Oct 2017 09:26:01 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e2wE2-0000V1-Kx for linux-arm-kernel@lists.infradead.org; Fri, 13 Oct 2017 09:25:58 +0000 Received: from 172.30.72.58 (EHLO DGGEMS401-HUB.china.huawei.com) ([172.30.72.58]) by dggrg04-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DIZ27715; Fri, 13 Oct 2017 17:25:20 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.301.0; Fri, 13 Oct 2017 17:24:54 +0800 From: Wei Yongjun To: Tony Lindgren , Russell King Subject: [PATCH -next] ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources() Date: Fri, 13 Oct 2017 09:29:25 +0000 Message-ID: <1507886965-156349-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.59E08681.0030, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9cdf8b162beeda8ff0b396d91b224ced X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171013_022551_008249_C07283D5 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-omap@vger.kernel.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fix to return error code -EINVAL from the irq_of_parse_and_map() error handling case instead of 0, as done elsewhere in this function. Fixes: d85a2d61432a ("ARM: OMAP2+: Populate legacy resources for dma and smartreflex") Signed-off-by: Wei Yongjun --- arch/arm/mach-omap2/omap_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 713fc6b..d45cbfd 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@ -433,8 +433,10 @@ void omap_device_delete(struct omap_device *od) irq = irq_of_parse_and_map(child, 0); if (!irq) irq = irq_of_parse_and_map(np, 0); - if (!irq) + if (!irq) { + error = -EINVAL; goto free; + } /* Legacy DMA code needs interrupt name to be "0" */ res[1].start = irq;