Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5475724rwb; Tue, 22 Nov 2022 00:00:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf7OMxsN6YspNBQiX6jazqGku9gvz4mwT9vghYN6HJwSLHvANM9rpF7qN95lLlD9CgByk8Q4 X-Received: by 2002:aa7:8429:0:b0:556:d001:b830 with SMTP id q9-20020aa78429000000b00556d001b830mr3040542pfn.62.1669104041421; Tue, 22 Nov 2022 00:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669104041; cv=none; d=google.com; s=arc-20160816; b=i03cFlVDjoR8YW1EYvjYQu9Qg98LiLdod5qSjdE25sN4Z2B8fzSAv8fc3IMsjPguF6 i4atv3DENBg4ApCS2+x+KjOjXiUXEzGkg5Dh8c688kZQ4WcGxDA45xPzukK+onsCRRM7 t85VJfz1yWCZNv13EZIdnPwQH9AamPysQmtaWVXl1Vejf+7C6fgt7js+0yu1LjQNhQXI r1cwoc1pEXMno70JiWsGw4boOZqiunxjidHOJK4+bf5cBaW2BGYV330/r8Ks9eEa4bmG ygLNOyMKH4zKvzizBI/NTEcbKWOZiUvJdt71tYWnCj4ccZNNDyXBKe8TPCP7iWqn+BuK 2dqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from; bh=y5ZRofbeE5CDV55tcmCkJBdiyBXu/pvBgR1al1Gq3h0=; b=nDj7e2jFY1y/aVKcerSXt94g50zSiwp05HRoq7DJQT8CzlCL5q8bwyMHmbuyhQ/z0I GMA/B3InhSGjhls+i30H1vx8eNGqhpWzTenh6GpIpoSmclishTY6G2aHUSw45dtNdQaB 8Or5nAkZReUVw3/c67nmhxL/7T8On1000iwBMbcwllKRnQZg4JGC7zMNCCq58i00rnF2 6NjmUHDXTXCFfeSvuzOAd/QGJHuqkQjno4yCZ71Ff5OZwbclbluJdQpuLM5veywAF0SI f2VjLsTb40qQxd3rZbWRBej9gjwOkMpDVtyHJuyquhurKcq95VI4WRIqv1GaZUv2ai4+ GdRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q80-20020a632a53000000b0047701022c79si14218754pgq.588.2022.11.22.00.00.27; Tue, 22 Nov 2022 00:00:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232224AbiKVG7k (ORCPT + 91 others); Tue, 22 Nov 2022 01:59:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbiKVG7i (ORCPT ); Tue, 22 Nov 2022 01:59:38 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D07542F3B9; Mon, 21 Nov 2022 22:59:36 -0800 (PST) Received: (Authenticated sender: peter@korsgaard.com) by mail.gandi.net (Postfix) with ESMTPSA id 8559B1BF208; Tue, 22 Nov 2022 06:59:33 +0000 (UTC) Received: from peko by dell.be.48ers.dk with local (Exim 4.94.2) (envelope-from ) id 1oxNFk-00H6YC-EK; Tue, 22 Nov 2022 07:59:32 +0100 From: Peter Korsgaard To: Liu Shixin Cc: Vinod Koul , Michal Simek , , , Subject: Re: [PATCH] dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node() References: <20221122021612.1908866-1-liushixin2@huawei.com> Date: Tue, 22 Nov 2022 07:59:32 +0100 In-Reply-To: <20221122021612.1908866-1-liushixin2@huawei.com> (Liu Shixin's message of "Tue, 22 Nov 2022 10:16:12 +0800") Message-ID: <8735ab5vaj.fsf@dell.be.48ers.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Liu" == Liu Shixin 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 Acked-by: Peter Korsgaard > --- > 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