From patchwork Thu Sep 27 05:54:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1511721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 361C8DFE80 for ; Thu, 27 Sep 2012 05:56:04 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TH73J-0006vd-U7; Thu, 27 Sep 2012 05:54:26 +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 1TH73G-0006oV-BK for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2012 05:54:23 +0000 Received: by mail-qc0-f177.google.com with SMTP id u28so1241785qcs.36 for ; Wed, 26 Sep 2012 22:54:22 -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=bZOvznANAfD9KGUjiWJsI6Y+g3ob5Hil0jyX2Qb/qko=; b=Pui3s7w0Xy4fqfntcKBeQDQU5Znydn2Cs2seYjLm9PlixzISeWTf8tmo3TkJWPFuTV tv8NdjXMm/aJj9F+IT9pQOFx5R7jip6YewHI7LdNiCgO2pfEspEagzdP4OVAwpzWvjuv pc5b0x57rir7EbDl9MlZWlprDxnyep/VhOuG1pBxRqZmz+vzuvGYI8ynkLWHRX0Au6Dn uH+2stONmuNQBrVjCJ5GJ2PY1f4qUXA1PTtkk8rCbE9LXU7MQhTlqFvsPtBiRF7OgjyZ 0WSTbwq9iy+yeLTPTw3jjfbbEoDmKJTw5+INP1vPkQRs+TfLxfXtDpApaMPK3Df0cbTA 8Glg== MIME-Version: 1.0 Received: by 10.229.136.131 with SMTP id r3mr1812653qct.145.1348725262152; Wed, 26 Sep 2012 22:54:22 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Wed, 26 Sep 2012 22:54:22 -0700 (PDT) Date: Thu, 27 Sep 2012 13:54:22 +0800 Message-ID: Subject: [PATCH] ARM: OMAP2+: SmartReflex: fix return value check in sr_dev_init() From: Wei Yongjun To: tony@atomide.com, 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.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 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.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 voltdm_lookup() 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 Acked-by: Jean Pihet --- arch/arm/mach-omap2/sr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c index d033a65..c248b30 100644 --- a/arch/arm/mach-omap2/sr_device.c +++ b/arch/arm/mach-omap2/sr_device.c @@ -123,7 +123,7 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user) sr_data->senp_mod = 0x1; sr_data->voltdm = voltdm_lookup(sr_dev_attr->sensor_voltdm_name); - if (IS_ERR(sr_data->voltdm)) { + if (!sr_data->voltdm) { pr_err("%s: Unable to get voltage domain pointer for VDD %s\n", __func__, sr_dev_attr->sensor_voltdm_name); goto exit;