* [PATCH -next] clk: sunxi: Fix return value check in sun8i_a23_mbus_setup()
@ 2016-07-06 12:21 weiyj_lk
2016-07-09 8:26 ` Maxime Ripard
0 siblings, 1 reply; 2+ messages in thread
From: weiyj_lk @ 2016-07-06 12:21 UTC (permalink / raw)
To: emilio, mturquette, sboyd, maxime.ripard, wens
Cc: Wei Yongjun, linux-clk, linux-arm-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
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>
---
drivers/clk/sunxi/clk-sun8i-mbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/sunxi/clk-sun8i-mbus.c b/drivers/clk/sunxi/clk-sun8i-mbus.c
index 411d303..b200ebf 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] clk: sunxi: Fix return value check in sun8i_a23_mbus_setup()
2016-07-06 12:21 [PATCH -next] clk: sunxi: Fix return value check in sun8i_a23_mbus_setup() weiyj_lk
@ 2016-07-09 8:26 ` Maxime Ripard
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2016-07-09 8:26 UTC (permalink / raw)
To: weiyj_lk
Cc: emilio, mturquette, sboyd, wens, Wei Yongjun, linux-clk,
linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
On Wed, Jul 06, 2016 at 12:21:47PM +0000, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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>
Applied, thanks
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-09 8:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06 12:21 [PATCH -next] clk: sunxi: Fix return value check in sun8i_a23_mbus_setup() weiyj_lk
2016-07-09 8:26 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).