From: Peter Korsgaard <peter@korsgaard.com>
To: Liu Shixin <liushixin2@huawei.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Michal Simek <michal.simek@xilinx.com>,
<dmaengine@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node()
Date: Tue, 22 Nov 2022 07:59:32 +0100 [thread overview]
Message-ID: <8735ab5vaj.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20221122021612.1908866-1-liushixin2@huawei.com> (Liu Shixin's message of "Tue, 22 Nov 2022 10:16:12 +0800")
>>>>> "Liu" == Liu Shixin <liushixin2@huawei.com> writes:
> Since for_each_child_of_node() will increase the refcount of node, we need
> to call of_node_put() manually when breaking out of the iteration.
> Fixes: 9cd4360de609 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support")
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
> ---
> drivers/dma/xilinx/xilinx_dma.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index 8cd4e69dc7b4..766017570488 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -3141,8 +3141,10 @@ static int xilinx_dma_probe(struct platform_device *pdev)
> /* Initialize the channels */
> for_each_child_of_node(node, child) {
> err = xilinx_dma_child_probe(xdev, child);
> - if (err < 0)
> + if (err < 0) {
> + of_node_put(child);
> goto error;
> + }
> }
> if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
> --
> 2.25.1
--
Bye, Peter Korsgaard
prev parent reply other threads:[~2022-11-22 6:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 2:16 Liu Shixin
2022-11-22 6:59 ` Peter Korsgaard [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=8735ab5vaj.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liushixin2@huawei.com \
--cc=michal.simek@xilinx.com \
--cc=vkoul@kernel.org \
/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®