remoteproc: qcom_wcnss: Add missing of_node_put() in qcom_iris_probe()
Subsystems (2)
PATCH 1/1 remoteproc: qcom_wcnss: Add missing of_node_put() in qcom_iris_probe()
Add missing of_node_put() in qcom_iris_probe() before return.
Reported-by Hulk Robot <[email protected]>
Signed-off-by Bixuan Cui <[email protected]>
--- drivers/remoteproc/qcom_wcnss_iris.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/remoteproc/qcom_wcnss_iris.c +3 -0
@@ -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); }
Signature · 1 line
2.17.1
Quoted 13 lines · Bixuan Cui
Add missing
of_node_put()inqcom_iris_probe()before return.Reported-by Hulk Robot <[email protected]>Signed-off-by Bixuan Cui <[email protected]>--- drivers/remoteproc/qcom_wcnss_iris.c | 3 +++ 1 file changed, 3 insertions(+)drivers/remoteproc/qcom_wcnss_iris.c +0
-0
drivers/remoteproc/qcom_wcnss_iris.c struct qcom_iris *qcom_iris_probe(struct device *parent, bool *use_48mhz_xo) · line 143
Quoted 4 lines
drivers/remoteproc/qcom_wcnss_iris.c +1
-0@@ -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
Quoted 19 lines
drivers/remoteproc/qcom_wcnss_iris.c +2
-0return 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); }Signature · 1 line
2.17.1