public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Bixuan Cui <cuibixuan@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, agross@kernel.org,
	ohad@wizery.com, mathieu.poirier@linaro.org
Subject: Re: [PATCH -next] remoteproc: qcom_wcnss: Add missing of_node_put() in qcom_iris_probe()
Date: Fri, 8 Oct 2021 22:17:59 -0500	[thread overview]
Message-ID: <YWEJ5yKDTdliWS+I@builder.lan> (raw)
In-Reply-To: <20210911081347.33929-1-cuibixuan@huawei.com>

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
> 

      reply	other threads:[~2021-10-09  3:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YWEJ5yKDTdliWS+I@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=cuibixuan@huawei.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=ohad@wizery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox