提交 e0654d01 编写于 作者: W Wei Yongjun 提交者: Sascha Hauer

ARM: imx: fix the return value check in imx_clk_busy_divider()

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 964a4da3
...@@ -108,7 +108,7 @@ struct clk *imx_clk_busy_divider(const char *name, const char *parent_name, ...@@ -108,7 +108,7 @@ struct clk *imx_clk_busy_divider(const char *name, const char *parent_name,
busy->div.hw.init = &init; busy->div.hw.init = &init;
clk = clk_register(NULL, &busy->div.hw); clk = clk_register(NULL, &busy->div.hw);
if (!clk) if (IS_ERR(clk))
kfree(busy); kfree(busy);
return clk; return clk;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册