From patchwork Mon May 13 04:25:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2556191 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 7C553DF2E5 for ; Mon, 13 May 2013 04:26:08 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UbkKg-00021Y-US; Mon, 13 May 2013 04:25:55 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UbkKd-0003EU-5A; Mon, 13 May 2013 04:25:51 +0000 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UbkKY-0003E9-3x for linux-arm-kernel@lists.infradead.org; Mon, 13 May 2013 04:25:48 +0000 Received: by mail-we0-f169.google.com with SMTP id x54so5932325wes.14 for ; Sun, 12 May 2013 21:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=fbyqodSV3v4KnF57AJ7fpu8fN2WelVPrOQEmPljYwhU=; b=rM0YcseZ1md6Yqllc9pPU9MFy2aSOOavT+7Llyk8f4wLQfEao3AX9c7B3lRrqwlVAO sJXtw9qJ466tI1KfpvX8yb1nkDgC/lb+/uhXxSqba2pp46cKU+0u+EvJ8GuVjcPDdWJb 46fZzhpB178BHTgILHp8Vpy2IHWdnDWV7OO5q2zhnEE5jdgTkYAMwLtsJg/OupxGwTQ2 EdvgRTbbNEeUTLqFBelZe9q6dJAWmxNXGldv90u9HkNbwPEY+dAi0ZwTET/Zt4NRZ0vH FvFbetCl7gej9qZQlWmfeqGzh9oLUA8lYSDybfHwUgTjWSpyJ8Sv3EsVhJaiADlXTvRl D4gQ== MIME-Version: 1.0 X-Received: by 10.204.168.201 with SMTP id v9mr4970396bky.116.1368419123201; Sun, 12 May 2013 21:25:23 -0700 (PDT) Received: by 10.204.199.129 with HTTP; Sun, 12 May 2013 21:25:23 -0700 (PDT) Date: Mon, 13 May 2013 12:25:23 +0800 Message-ID: Subject: [PATCH] ARM: OMAP: fix error return code in omap1_system_dma_init() From: Wei Yongjun To: tony@atomide.com, linux@arm.linux.org.uk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130513_002546_335616_39836D2B X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (weiyj.lk[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: yongjun_wei@trendmicro.com.cn, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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 From: Wei Yongjun Fix to return -ENOMEM in the d->chan alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- arch/arm/mach-omap1/dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index 68ab858..a94b3a7 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c @@ -345,6 +345,7 @@ static int __init omap1_system_dma_init(void) dev_err(&pdev->dev, "%s: Memory allocation failed for d->chan!\n", __func__); + ret = -ENOMEM; goto exit_release_d; }