Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: sunxi: Fix return value check in sun8i_a23_mbus_setup()

In case of error, the function of_io_request_and_map() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

authored by

Wei Yongjun and committed by
Maxime Ripard
fbe359f1 7e196aa1

+1 -1
+1 -1
drivers/clk/sunxi/clk-sun8i-mbus.c
··· 48 48 return; 49 49 50 50 reg = of_io_request_and_map(node, 0, of_node_full_name(node)); 51 - if (!reg) { 51 + if (IS_ERR(reg)) { 52 52 pr_err("Could not get registers for sun8i-mbus-clk\n"); 53 53 goto err_free_parents; 54 54 }