From patchwork Tue May 7 11:58:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2532881 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 7C8A8DF215 for ; Tue, 7 May 2013 11:58:47 +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 1UZgXd-00057n-5A; Tue, 07 May 2013 11:58:45 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZgXa-0001MZ-Cb; Tue, 07 May 2013 11:58:42 +0000 Received: from mail-bk0-x234.google.com ([2a00:1450:4008:c01::234]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZgXX-0001M7-8M for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2013 11:58:40 +0000 Received: by mail-bk0-f52.google.com with SMTP id q16so233331bkw.25 for ; Tue, 07 May 2013 04:58:17 -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=0x/UtY4qvKfqO6hdWNm8djUBk2VArWGR51jhw1n/h3A=; b=PGEcsdi2is7YF2qW0G8frVqotACZebOEBeRgVZn2XItGGTO0KVXdl5TKOoFtmacWdz /AMTQ3cJ94DqhdMMHcGhlZxJyfWeqg9iR1xInOPJC5iwV4Jgb5Ue2gZqQpg+UBod7ICW eq/mx+H2kwG0Ddp+4OFbSSy3T+hdImtN4Iv1QLZVKuXJTshBi4y3LtcWzEiBuh5lB4x/ rPu2/wxrpzelnaygLsDmc6kO8GB+FgdusgPzPxa9kTzz40jX5ApNDlnlImx/SqmfdPQm 1Zyp8GXiTI4xoOe9EQzUShcBQCNOVXhnUXs+fc4a2tCpDZIZvPpfXqd4HLmFds4+8Wy5 d5ag== MIME-Version: 1.0 X-Received: by 10.205.101.65 with SMTP id cz1mr464410bkc.124.1367927897053; Tue, 07 May 2013 04:58:17 -0700 (PDT) Received: by 10.204.199.129 with HTTP; Tue, 7 May 2013 04:58:17 -0700 (PDT) Date: Tue, 7 May 2013 19:58:17 +0800 Message-ID: Subject: [PATCH] [ARM] rpc: acornscsi: fix error return code in acornscsi_probe() From: Wei Yongjun To: linux@arm.linux.org.uk, JBottomley@parallels.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130507_075839_435208_0ADCDFEA X-CRM114-Status: GOOD ( 10.49 ) 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-scsi@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 ecardm_iomap() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/scsi/arm/acornscsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index 09ba186..bee7142 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c @@ -2961,8 +2961,10 @@ static int acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id) ashost->base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0); ashost->fast = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); - if (!ashost->base || !ashost->fast) + if (!ashost->base || !ashost->fast) { + ret = -ENOMEM; goto out_put; + } host->irq = ec->irq; ashost->host = host;