mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Wan Jiabing <wanjiabing@vivo.com>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Michal Simek <michal.simek@xilinx.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	Wendy Liang <wendy.liang@xilinx.com>
Cc: <kael_w@yeah.net>
Subject: Re: [PATCH] mailbox: zynqmp-ipi: Add of_node_put() before goto
Date: Mon, 18 Oct 2021 09:23:49 +0200	[thread overview]
Message-ID: <53c559a8-9bea-c4f9-3650-88e033a2a3f4@xilinx.com> (raw)
In-Reply-To: <20211018013427.5476-1-wanjiabing@vivo.com>

+Wendy: Please check.

M

On 10/18/21 03:34, Wan Jiabing wrote:
> Fix following coccicheck warning:
> ./drivers/mailbox/zynqmp-ipi-mailbox.c:654:1-33: WARNING: Function
> for_each_available_child_of_node should have of_node_put() before goto
> 
> Early exits from for_each_available_child_of_node should decrement the
> node reference counter.
> 
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
>   drivers/mailbox/zynqmp-ipi-mailbox.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
> index f44079d62b1a..67d4203fb4f5 100644
> --- a/drivers/mailbox/zynqmp-ipi-mailbox.c
> +++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
> @@ -657,6 +657,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
>   		if (ret) {
>   			dev_err(dev, "failed to probe subdev.\n");
>   			ret = -EINVAL;
> +			of_node_put(nc);
>   			goto free_mbox_dev;
>   		}
>   		mbox++;
> 

      reply	other threads:[~2021-10-18  7:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  1:34 Wan Jiabing
2021-10-18  7:23 ` Michal Simek [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=53c559a8-9bea-c4f9-3650-88e033a2a3f4@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=kael_w@yeah.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wanjiabing@vivo.com \
    --cc=wendy.liang@xilinx.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

all inboxes | Powered by JetHome®