From patchwork Sat Mar 26 08:28:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12792279 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 809A3C433F5 for ; Sat, 26 Mar 2022 08:28:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232124AbiCZI3y (ORCPT ); Sat, 26 Mar 2022 04:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232116AbiCZI3x (ORCPT ); Sat, 26 Mar 2022 04:29:53 -0400 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F819644FA; Sat, 26 Mar 2022 01:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:subject:message-id:mime-version; bh=jZsPZYTJSjqtzOW+j0Wmy7pp+WHf6cgPejC+X3/CrWk=; b=uNMprU4FD0FLWRmvbBnXi40F+viF7aYGNC2EUituv88l0+8peRIJpocf Wz/FPLS2PQpHdtAA0ZMSBY1owIyJKDPAmcOPv7jdmN9XnjnUvz5VeQ621 gbmix9TeHOPAOKujhELP5FHwBAoQSv1GfGkFqqpqr13eyrKaknaHjfrag E=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.90,211,1643670000"; d="scan'208";a="28278377" Received: from 203.107.68.85.rev.sfr.net (HELO hadrien) ([85.68.107.203]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2022 09:28:12 +0100 Date: Sat, 26 Mar 2022 09:28:12 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: 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 , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: adc: fix for_each_child.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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 --- 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; }