Message ID | 1515116461-156320-1-git-send-email-weiyongjun1@huawei.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
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?
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
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) +
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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html