From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brown Subject: Re: [PATCH] msm: clock: fix return value check in msm_clock_init() Date: Fri, 21 Sep 2012 11:44:18 -0700 Message-ID: <20120921184418.GB25508@codeaurora.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:22294 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757369Ab2IUSoU (ORCPT ); Fri, 21 Sep 2012 14:44:20 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Wei Yongjun Cc: Stephen Boyd , dwalker@fifo99.com, bryanh@codeaurora.org, linux@arm.linux.org.uk, yongjun_wei@trendmicro.com.cn, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org On Fri, Sep 21, 2012 at 02:23:13PM +0800, Wei Yongjun wrote: > From: Wei Yongjun > > In case of error, the function clk_get() returns ERR_PTR() not > NULL pointer. The NULL test in return value check should be > replaced with IS_ERR(). > > dpatch engine is used to auto generated this patch. > (https://github.com/weiyj/dpatch) > > Signed-off-by: Wei Yongjun > --- > arch/arm/mach-msm/clock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c > index d9145df..fd52891 100644 > --- a/arch/arm/mach-msm/clock.c > +++ b/arch/arm/mach-msm/clock.c > @@ -148,7 +148,7 @@ void __init msm_clock_init(struct clk_lookup *clock_tbl, unsigned num_clocks) > mutex_unlock(&clocks_mutex); > > ebi1_clk = clk_get(NULL, "ebi1_clk"); > - BUG_ON(ebi1_clk == NULL); > + BUG_ON(IS_ERR(ebi1_clk)); It looks like this code is being removed entirely by a patch that just was sent out by Stephen Boyd. Stephen, can you make sure that this gets included if this comes back, but for now I think this is already taken care of. Thanks, David -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation