All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] clk: aspeed: Fix return value check in aspeed_cc_init()
@ 2018-01-05  1:41 Wei Yongjun
  2018-01-10 21:19 ` Stephen Boyd
  2018-01-10 21:38 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2018-01-05  1:41 UTC (permalink / raw)
  To: Joel Stanley, Michael Turquette, Stephen Boyd; +Cc: Wei Yongjun, linux-clk

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

Fixes: a2e230c7b2ea ("clk: Add clock driver for ASPEED BMC SoCs")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/clk/clk-aspeed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c
index 6fb3447..f9b9688 100644
--- a/drivers/clk/clk-aspeed.c
+++ b/drivers/clk/clk-aspeed.c
@@ -609,7 +609,7 @@ static void __init aspeed_cc_init(struct device_node *np)
 	int i;
 
 	scu_base = of_iomap(np, 0);
-	if (IS_ERR(scu_base))
+	if (!scu_base)
 		return;
 
 	aspeed_clk_data = kzalloc(sizeof(*aspeed_clk_data) +

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] clk: aspeed: Fix return value check in aspeed_cc_init()
  2018-01-05  1:41 [PATCH -next] clk: aspeed: Fix return value check in aspeed_cc_init() Wei Yongjun
@ 2018-01-10 21:19 ` Stephen Boyd
  2018-01-10 21:38 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2018-01-10 21:19 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Joel Stanley, Michael Turquette, linux-clk

On 01/05, Wei Yongjun wrote:
> In case of error, the function of_iomap() returns NULL pointer not
> ERR_PTR(). The IS_ERR() test in the return value check should be
> replaced with NULL test.
> 
> Fixes: a2e230c7b2ea ("clk: Add clock driver for ASPEED BMC SoCs")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Same comment for this. I suspect coccinelle is finding this but
the semantic patch is not in the kernel repo?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] clk: aspeed: Fix return value check in aspeed_cc_init()
  2018-01-05  1:41 [PATCH -next] clk: aspeed: Fix return value check in aspeed_cc_init() Wei Yongjun
  2018-01-10 21:19 ` Stephen Boyd
@ 2018-01-10 21:38 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2018-01-10 21:38 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Joel Stanley, Michael Turquette, linux-clk

On 01/05, Wei Yongjun wrote:
> In case of error, the function of_iomap() returns NULL pointer not
> ERR_PTR(). The IS_ERR() test in the return value check should be
> replaced with NULL test.
> 
> Fixes: a2e230c7b2ea ("clk: Add clock driver for ASPEED BMC SoCs")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-10 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05  1:41 [PATCH -next] clk: aspeed: Fix return value check in aspeed_cc_init() Wei Yongjun
2018-01-10 21:19 ` Stephen Boyd
2018-01-10 21:38 ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.