summaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2016-07-06 12:21:47 +0000
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-08-08 19:27:33 +0200
commitfbe359f12ce40e3126bea959b135656e4a305897 (patch)
treed8ca1351307dbc06e2c1f9cf2ebcb8ac3097f3ea /drivers/clk
parent7e196aa1a011da35a04cb1f161e186563aa8d8db (diff)
downloadlinux-fbe359f12ce40e3126bea959b135656e4a305897.tar.bz2
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>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/sunxi/clk-sun8i-mbus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/sunxi/clk-sun8i-mbus.c b/drivers/clk/sunxi/clk-sun8i-mbus.c
index 411d3033a96e..b200ebf159ee 100644
--- a/drivers/clk/sunxi/clk-sun8i-mbus.c
+++ b/drivers/clk/sunxi/clk-sun8i-mbus.c
@@ -48,7 +48,7 @@ static void __init sun8i_a23_mbus_setup(struct device_node *node)
return;
reg = of_io_request_and_map(node, 0, of_node_full_name(node));
- if (!reg) {
+ if (IS_ERR(reg)) {
pr_err("Could not get registers for sun8i-mbus-clk\n");
goto err_free_parents;
}