From patchwork Thu Sep 27 05:54:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1511701 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4C0EB3FDAE for ; Thu, 27 Sep 2012 05:54:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754741Ab2I0Fyh (ORCPT ); Thu, 27 Sep 2012 01:54:37 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:38591 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475Ab2I0Fyh (ORCPT ); Thu, 27 Sep 2012 01:54:37 -0400 Received: by mail-qc0-f174.google.com with SMTP id d3so786900qch.19 for ; Wed, 26 Sep 2012 22:54:36 -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=NyYKJB/LcgPYiIEGyg2n0jXzZK2nNJpRZKlw5yoRTn8=; b=DFWEOfKjGfwS6DWL/aU/VqHvlfTF7no0fna6fPZYyit4pxCSdIFhXMruUrooqtgO51 oY4stTcR2B8MWJF2h8di192Y7j7UwtG+dnDbTQhSUFcFZd+pkfSHTUAZjtcPdXeb4zSz C8veWS9HGKzrzA231DuyUONDWGdNyY9uW8qJ/XloIDQ5D8piT208Pn/PFDm0cJUAMBKS k523Bm1zZCeStYY09Sv9LPtvc3MxdvHXscMT4PIJLur7n4w/kx7OvID3ho9vnJvBbbAo 3pXYrA7inJ7tWkqbITPMRlK+O/8UnjGqzAXZfCCenwBsR6JkYoF2X7yBZcGk70Vie0+Q 4igA== MIME-Version: 1.0 Received: by 10.224.100.200 with SMTP id z8mr7228403qan.75.1348725276643; Wed, 26 Sep 2012 22:54:36 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Wed, 26 Sep 2012 22:54:36 -0700 (PDT) Date: Thu, 27 Sep 2012 13:54:36 +0800 Message-ID: Subject: [PATCH] ARM: OMAP2+: PM: fix return value check in omap2_set_init_voltage() From: Wei Yongjun To: khilman@ti.com, tony@atomide.com, linux@arm.linux.org.uk Cc: yongjun_wei@trendmicro.com.cn, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 9cb5ced..ab15e5c 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -176,7 +176,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, } voltdm = voltdm_lookup(vdd_name); - if (IS_ERR(voltdm)) { + if (!voltdm) { pr_err("%s: unable to get vdd pointer for vdd_%s\n", __func__, vdd_name); goto exit;