msm: clock: fix return value check in msm_clock_init()
Subsystems (3)
PATCH 1/1 msm: clock: fix return value check in msm_clock_init()
From: Wei Yongjun <[email protected]>
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)
--- arch/arm/mach-msm/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-msm/clock.c +1 -1
@@ -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)); }
PATCH 1/1 msm: clock: fix return value check in msm_clock_init()
Quoted 19 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
clk_get()returnsERR_PTR()not NULL pointer. The NULL test in return value check should be replaced withIS_ERR().dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)Signed-off-by Wei Yongjun <[email protected]>--- arch/arm/mach-msm/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-msm/clock.c +0
-0
arch/arm/mach-msm/clock.c void __init msm_clock_init(struct clk_lookup *clock_tbl, unsigned num_clocks) · line 151
Quoted 5 lines
arch/arm/mach-msm/clock.c +1
-1@@ -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
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation