* [PATCH -next] remoteproc: qcom_wcnss: Add missing of_node_put() in qcom_iris_probe()
@ 2021-09-11 8:13 Bixuan Cui
2021-10-09 3:17 ` Bjorn Andersson
0 siblings, 1 reply; 2+ messages in thread
From: Bixuan Cui @ 2021-09-11 8:13 UTC (permalink / raw)
To: linux-kernel, linux-remoteproc, linux-arm-msm
Cc: agross, bjorn.andersson, ohad, mathieu.poirier
Add missing of_node_put() in qcom_iris_probe() before return.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
drivers/remoteproc/qcom_wcnss_iris.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/remoteproc/qcom_wcnss_iris.c b/drivers/remoteproc/qcom_wcnss_iris.c
index 09720ddddc85..f77ab49a9cae 100644
--- a/drivers/remoteproc/qcom_wcnss_iris.c
+++ b/drivers/remoteproc/qcom_wcnss_iris.c
@@ -140,6 +140,7 @@ struct qcom_iris *qcom_iris_probe(struct device *parent, bool *use_48mhz_xo)
ret = device_add(&iris->dev);
if (ret) {
put_device(&iris->dev);
+ of_node_put(of_node);
return ERR_PTR(ret);
}
@@ -192,10 +193,12 @@ struct qcom_iris *qcom_iris_probe(struct device *parent, bool *use_48mhz_xo)
*use_48mhz_xo = data->use_48mhz_xo;
+ of_node_put(of_node);
return iris;
err_device_del:
device_del(&iris->dev);
+ of_node_put(of_node);
return ERR_PTR(ret);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] remoteproc: qcom_wcnss: Add missing of_node_put() in qcom_iris_probe()
2021-09-11 8:13 [PATCH -next] remoteproc: qcom_wcnss: Add missing of_node_put() in qcom_iris_probe() Bixuan Cui
@ 2021-10-09 3:17 ` Bjorn Andersson
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2021-10-09 3:17 UTC (permalink / raw)
To: Bixuan Cui
Cc: linux-kernel, linux-remoteproc, linux-arm-msm, agross, ohad,
mathieu.poirier
On Sat 11 Sep 03:13 CDT 2021, Bixuan Cui wrote:
> Add missing of_node_put() in qcom_iris_probe() before return.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
> ---
> drivers/remoteproc/qcom_wcnss_iris.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/remoteproc/qcom_wcnss_iris.c b/drivers/remoteproc/qcom_wcnss_iris.c
> index 09720ddddc85..f77ab49a9cae 100644
> --- a/drivers/remoteproc/qcom_wcnss_iris.c
> +++ b/drivers/remoteproc/qcom_wcnss_iris.c
> @@ -140,6 +140,7 @@ struct qcom_iris *qcom_iris_probe(struct device *parent, bool *use_48mhz_xo)
> ret = device_add(&iris->dev);
> if (ret) {
> put_device(&iris->dev);
> + of_node_put(of_node);
We store "of_node" in iris->dev, so put_device() will invoke
qcom_iris_release() which of_node_put(iris->dev.of_node);
So I think this is a false alarm, but please correct me if I'm wrong.
Thanks,
Bjorn
> return ERR_PTR(ret);
> }
>
> @@ -192,10 +193,12 @@ struct qcom_iris *qcom_iris_probe(struct device *parent, bool *use_48mhz_xo)
>
> *use_48mhz_xo = data->use_48mhz_xo;
>
> + of_node_put(of_node);
> return iris;
>
> err_device_del:
> device_del(&iris->dev);
> + of_node_put(of_node);
>
> return ERR_PTR(ret);
> }
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-09 3:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11 8:13 [PATCH -next] remoteproc: qcom_wcnss: Add missing of_node_put() in qcom_iris_probe() Bixuan Cui
2021-10-09 3:17 ` Bjorn Andersson
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).