* [PATCH -next] clk: qcom: Fix return value check in apss_ipq6018_probe()
@ 2020-06-28 2:30 Wei Yongjun
2020-06-29 21:15 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2020-06-28 2:30 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Sivaprakash Murugesan
Cc: Wei Yongjun, linux-arm-msm, linux-clk, kernel-janitors, Hulk Robot
In case of error, the function dev_get_regmap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Fixes: 5e77b4ef1b19 ("clk: qcom: Add ipq6018 apss clock controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/clk/qcom/apss-ipq6018.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c
index 004f7e1ecdc2..d78ff2f310bf 100644
--- a/drivers/clk/qcom/apss-ipq6018.c
+++ b/drivers/clk/qcom/apss-ipq6018.c
@@ -87,8 +87,8 @@ static int apss_ipq6018_probe(struct platform_device *pdev)
struct regmap *regmap;
regmap = dev_get_regmap(pdev->dev.parent, NULL);
- if (IS_ERR(regmap))
- return PTR_ERR(regmap);
+ if (!regmap)
+ return -ENODEV;
return qcom_cc_really_probe(pdev, &apss_ipq6018_desc, regmap);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] clk: qcom: Fix return value check in apss_ipq6018_probe()
2020-06-28 2:30 [PATCH -next] clk: qcom: Fix return value check in apss_ipq6018_probe() Wei Yongjun
@ 2020-06-29 21:15 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2020-06-29 21:15 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Michael Turquette,
Sivaprakash Murugesan, Wei Yongjun
Cc: Wei Yongjun, linux-arm-msm, linux-clk, kernel-janitors, Hulk Robot
Quoting Wei Yongjun (2020-06-27 19:30:55)
> In case of error, the function dev_get_regmap() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check should be
> replaced with NULL test.
>
> Fixes: 5e77b4ef1b19 ("clk: qcom: Add ipq6018 apss clock controller")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-29 21:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28 2:30 [PATCH -next] clk: qcom: Fix return value check in apss_ipq6018_probe() Wei Yongjun
2020-06-29 21:15 ` Stephen Boyd
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).