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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1C99C433EF for ; Sun, 27 Mar 2022 13:30:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232359AbiC0Ncd (ORCPT ); Sun, 27 Mar 2022 09:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbiC0Ncd (ORCPT ); Sun, 27 Mar 2022 09:32:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDAFB36E2F; Sun, 27 Mar 2022 06:30:54 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 6033061016; Sun, 27 Mar 2022 13:30:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37216C340EC; Sun, 27 Mar 2022 13:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648387853; bh=iueUggcwK5JXu0x796gR3JLrqk4cfY0hnskSijVeJq8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dnvA2DQoQrE+adwpFzDFcsa8J6t7KSAFALrYXxSI9Xqb6YDqryhs+3Lj5BKmB9Iyf cbvH+r9lmhNlytkB400sZmPb/BUC3vZV1Tl0WGFOmlj791IyN5ziLhV/Yd6gGb14bP tNioc4z5GHDqayNDpZuvz2gHzA/jcqX9wOduACGGOhlaegeOK9yEZ6YgcUPmS3djpT ojbA66qUs4TtVh95ZDCJCb2wwLP11RmqZs2X64ysQZVZdVeM5puYoNV6eJ+cXbVJFN PzH9Eu/4cVzCaWA03gOcgM3ywuE1RgwyGOzGJ80AYajB8JNB1CykR1m20IbcqHJIVF urQxpn2Zy+KYQ== Date: Sun, 27 Mar 2022 14:38:20 +0100 From: Jonathan Cameron To: Julia Lawall Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org, Rajnikant Bhojani , Michal Simek , Hyun Kwon , Shubhrajyoti Datta , Jean-Francois Dagenais , Olivier Dugas , Manish Narani , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: fix for_each_child.cocci warnings Message-ID: <20220327143820.45fc1d6d@jic23-huawei> In-Reply-To: References: X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sat, 26 Mar 2022 09:28:12 +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: Rajnikant Bhojani > Reported-by: kernel test robot > Signed-off-by: kernel test robot > Signed-off-by: Julia Lawall The upstream version (in IIO for now, but I'd imagine will hit Linus' tree in next few days) of this looks rather different (no dt code an more) so I suspect this fix is for a now dead branch... Jonathan > --- > > tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS > head: 1870e0fa79a9d58c6748c34550f3ccea0b515933 > commit: d073b83d3f8f3ba83c59f7502371b1cf9eb35e92 [541/1029] iio: adc: Add Xilinx AMS driver > :::::: branch date: 35 hours ago > :::::: commit date: 8 weeks ago > > Please take the patch only if it's a positive warning. Thanks! > > drivers/iio/adc/xilinx-ams.c | 1 + > 1 file changed, 1 insertion(+) > > --- a/drivers/iio/adc/xilinx-ams.c > +++ b/drivers/iio/adc/xilinx-ams.c > @@ -920,6 +920,7 @@ static int ams_parse_dt(struct iio_dev * > ams_channels + num_channels); > if (ret < 0) { > kfree(ams_channels); > + of_node_put(child_node); > return ret; > } >