From patchwork Thu Sep 27 05:54:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1511711 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id D574A3FDAE for ; Thu, 27 Sep 2012 05:55:51 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TH734-0006qk-3n; Thu, 27 Sep 2012 05:54:10 +0000 Received: from mail-qc0-f177.google.com ([209.85.216.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TH72x-0006oV-M0 for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2012 05:54:06 +0000 Received: by qcsu28 with SMTP id u28so1241785qcs.36 for ; Wed, 26 Sep 2012 22:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=xEFogfU40kd9vMWz9z3wW4EhgBRum8moPIPhrRhsF6o=; b=SaDeK1DBGF0CXLPY/mM0wPAStGkz/mu021KVwtBno9Q4cJ7uI/sVJ585IXMyri76CL zDDDCm2t6I7os8tS+fZsd1pvnqJi9Ed7eE1FcuYKdBQp3rIWYWKYwVOqJ6DuRt8BNfGP FHVO6eByfJUhHYM+SaVHdS3xnI9NKZrLyWJtWhBZ3Tj3apNXBgvR0L1rsQs5FkJ03ylS TJPw2jvXuPZs65LgLKf42yP5xf8ygXXjOr5gv6lv8zKASrlFfUt7WsZP+yzSvKTtH7Gl LakcIU2Lv9GzD8O/EhE7P3a2E6knMvuGIqB1LqMm8NwDgeo8TkufXeeqLGgpyKzoyLV7 ep1w== MIME-Version: 1.0 Received: by 10.224.168.83 with SMTP id t19mr7416386qay.8.1348725241125; Wed, 26 Sep 2012 22:54:01 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Wed, 26 Sep 2012 22:54:01 -0700 (PDT) Date: Thu, 27 Sep 2012 13:54:01 +0800 Message-ID: Subject: [PATCH] ARM: imx: fix return value check in imx3_init_l2x0() From: Wei Yongjun To: kernel@pengutronix.de, linux@arm.linux.org.uk X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (weiyj.lk[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.216.177 listed in list.dnswl.org] -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-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Wei Yongjun In case of error, the function ioremap() returns NULL not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- arch/arm/mach-imx/mm-imx3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 9d2c843..b5deb05 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c @@ -108,9 +108,8 @@ void __init imx3_init_l2x0(void) } l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); - if (IS_ERR(l2x0_base)) { - printk(KERN_ERR "remapping L2 cache area failed with %ld\n", - PTR_ERR(l2x0_base)); + if (!l2x0_base) { + printk(KERN_ERR "remapping L2 cache area failed\n"); return; }