From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9474CC433EF for ; Sun, 13 Feb 2022 16:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+Mr5P/jDwJIk4Up1XcT5M0I1OctEn/C35QYOgKDD39U=; b=JHzfOJ+OzSGvtD R3pc0u6DuW0ST7l+HQN+BIDP0yNQaJmFhh7A8R0u8Vg5DOTPnlHHZHEpR/V6jiKYG8XfIpbU1rEgD n8bj3x0Ouj8PCpkb2CABroJ9APXDIw3FAUy4GDPnlBalesITd+wO+HLVc07p+F/Ahlt3jEzLohYlD DfosgJjI0a6l2s+Qfh3UwmNibBomwNOGeTuvB1KWP5JNeqwAZjejf99xHUqpWLmdkU/WAnN2Zl8ah bi6J7OL67cedMzd+t1+4QWwFI4x1hOf/uhfATTdO3yxDqHf2OOOUSlYRDJaMCCQD3P8FQHSkYs1sG gLXhfBeCZDYqwkZmIRGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJHdr-00Bx2u-Qv; Sun, 13 Feb 2022 16:22:27 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJHdn-00Bx1I-H6 for linux-arm-kernel@lists.infradead.org; Sun, 13 Feb 2022 16:22:25 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 23CBCB80B2B; Sun, 13 Feb 2022 16:22:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6FF7C340F0; Sun, 13 Feb 2022 16:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644769339; bh=czxEEr/GBsTWRl7yYnSsYAZb/4+oUEgjhNhdXN4Iiio=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GfCp0kr4KenvGejya3Gs83lT4nlL53uGu0IiIJC88tM5xZzkGjxT3hZRZ7kjiE2Rd NCdZz/L0DUrnSFhN6e2748W3yNhFOmCmc/eJUqk1Z/9jxfUa84AiaDW9urYdYRXzQb dcTPMhJD8hFrQTqiceV+fj82UYRmveAlERcXu3Zc+tK8ij9tb04t8yuVQwtY5Tu9vs HYhJQMDFLyK5jofVj1GlwGnYorbI4m3SfVie9XI6kUlQPS8tC+Jnaq96k6G1IPZE+l CvfQ0KQ2NY3Q0ZTAc/r0wNsqyn8lI4kDO98aBx49OlbkhuZO3eFjCdabfUAe0V201k 0yibIHcWHWhrw== Date: Sun, 13 Feb 2022 16:28:59 +0000 From: Jonathan Cameron To: Julia Lawall , Lars-Peter Clausen Cc: Anand Ashok Dumbre , kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org, Michal Simek , Dragan Cvetic , git@xilinx.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: versal-sysmon: fix for_each_child.cocci warnings Message-ID: <20220213162859.3d968256@jic23-huawei> In-Reply-To: References: X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_082223_768810_06BC1E1E X-CRM114-Status: GOOD ( 18.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 12 Feb 2022 23:39:33 +0100 (CET) Julia Lawall wrote: > From: kernel test robot > > For_each_child_of_node" should have of_node_put() before return. > > Generated by: scripts/coccinelle/iterators/for_each_child.cocci > > CC: Anand Ashok Dumbre > Reported-by: kernel test robot > Signed-off-by: kernel test robot > Signed-off-by: Julia Lawall > > --- > > tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15 > head: 966124532656bc95d781abf57531e4cd4f962237 > commit: 1459646ab280aa68c3c4fa1d9552ea21f15d7a2d [543/923] iio: versal-sysmon: add driver for Versal Sysmon > :::::: branch date: 3 days ago > :::::: commit date: 12 days ago > > Please take the patch only if it's a positive warning. Thanks! Patch is obviously correct, but this driver isn't upstream so from point of view of the IIO tree I'm ignoring this. Thanks, Jonathan > > versal-sysmon.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > --- a/drivers/iio/adc/versal-sysmon.c > +++ b/drivers/iio/adc/versal-sysmon.c > @@ -875,12 +875,16 @@ static int sysmon_parse_dt(struct iio_de > > for_each_child_of_node(np, child_node) { > ret = of_property_read_u32(child_node, "reg", ®); > - if (ret < 0) > + if (ret < 0) { > + of_node_put(child_node); > return ret; > + } > > ret = of_property_read_string(child_node, "xlnx,name", &name); > - if (ret < 0) > + if (ret < 0) { > + of_node_put(child_node); > return ret; > + } > > sysmon_channels[i].type = IIO_VOLTAGE; > sysmon_channels[i].indexed = 1; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel