Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0654d01 authored by Wei Yongjun's avatar Wei Yongjun Committed by Sascha Hauer
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 964a4da3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;