All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] msm: clock: fix return value check in msm_clock_init()
@ 2012-09-21  6:23 ` Wei Yongjun
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2012-09-21  6:23 UTC (permalink / raw)
  To: davidb, dwalker, bryanh, linux
  Cc: yongjun_wei, linux-arm-msm, linux-arm-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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 <yongjun_wei@trendmicro.com.cn>
---
 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));
 
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-21 18:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21  6:23 [PATCH] msm: clock: fix return value check in msm_clock_init() Wei Yongjun
2012-09-21  6:23 ` Wei Yongjun
2012-09-21 18:44 ` David Brown
2012-09-21 18:44   ` David Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.