Skip to content

Commit

Permalink
ARM: imx: fix the return value check in imx_clk_busy_divider()
Browse files Browse the repository at this point in the history
In case of error, the function clk_register() returns ERR_PTR()
no NULL pointer. The NULL test in the 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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Wei Yongjun authored and Sascha Hauer committed Oct 8, 2012
1 parent 964a4da commit e0654d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/clk-busy.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct clk *imx_clk_busy_divider(const char *name, const char *parent_name,
busy->div.hw.init = &init;

clk = clk_register(NULL, &busy->div.hw);
if (!clk)
if (IS_ERR(clk))
kfree(busy);

return clk;
Expand Down

0 comments on commit e0654d0

Please sign in to comment.