lkml.org 
[lkml]   [2021]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] remoteproc: qcom_wcnss: Add missing of_node_put() in qcom_iris_probe()
Date
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
\
 
 \ /
  Last update: 2021-09-11 10:18    [W:0.066 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site