From patchwork Thu Sep 2 16:54:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12472173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 094A6C83028 for ; Thu, 2 Sep 2021 16:56:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C8AA060FD7 for ; Thu, 2 Sep 2021 16:56:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C8AA060FD7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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: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:In-Reply-To:References: List-Owner; bh=KVTxuTeKH0AAcTM5b+zWOB1Cg0nBGY5O0q99m7SyoW4=; b=n+faK32BJ6nn8d QXfvc8ZBoBQirqEKdDgfCkrCE4PIfcJLuwrd2yLmkILbrG60Jkq0Z96bcLn5kIT09tm3tMUn5oyGG esc/lLQFK+nodHs9/ge62lDc/dPnUDNNqWlnLOVAPrRQViA6DsELZZwvJ3EDJ4soPdVA7z7s+yKsD NXRQhAxrIJqm0uFUY9PO16Uvq6Q9eD2NSTsgzMzfvWobEoyrhgeBy4U6a4KEgmLvyt6u3rBvn5Qzz nlrGW8n3Y74SMgcuWp9iKMqCNByV8pzzqXK2IziYtWvHk4pAgnTrF+jmDAExIuq4NfQj1nOt2oZwH Nq3GU5LdQXgBDirgRZ+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLpz4-00A2sp-M4; Thu, 02 Sep 2021 16:54:38 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLpys-00A2r9-DM for linux-arm-kernel@lists.infradead.org; Thu, 02 Sep 2021 16:54:28 +0000 IronPort-HdrOrdr: A9a23:xLkbEq8MY65PL3T1Il5uk+DTI+orL9Y04lQ7vn2ZKCYlEPBw+PrEoB1273XJYVUqKRIdcLK7WZVoKEm0naKdirN+AV7NZmXbUSeTTL1K3M/ShwftHCDz7YdmuJtIeaIWMrLNMWQ= X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="391793408" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2021 18:54:22 +0200 Date: Thu, 2 Sep 2021 18:54:21 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Amit Kumar Mahapatra cc: Michal Simek , Naga Sureshkumar Relli , Shubhrajyoti Datta , P L Sai Krishna , Ranjit Waghmode , Tejas Prajapati Rameshchandra , Rajan Vaja , kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] spi: fix for_each_child.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210902_095426_792214_B0348AE0 X-CRM114-Status: GOOD ( 10.81 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org for_each_available_child_of_node should have of_node_put() before escaping the loop via the breaks.. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Fixes: ffc5cb8494ba ("spi: Update ZynqMP and Versal QSPI controller driver") CC: Amit Kumar Mahapatra Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- tree: https://github.com/Xilinx/linux-xlnx master head: 52495976d054651fbf88cb12e08c57bf8d0ad781 commit: ffc5cb8494ba2abe218134584b22fd874b71d504 [11243/12425] spi: Update ZynqMP and Versal QSPI controller driver :::::: branch date: 2 days ago :::::: commit date: 5 months ago Please take the patch only if it's a positive warning. Thanks! spi-zynqmp-gqspi.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -1362,6 +1362,7 @@ static int zynqmp_qspi_probe(struct plat &rx_bus_width); if (!ret) { xqspi->rx_bus_width = rx_bus_width; + of_node_put(nc); break; } } @@ -1374,6 +1375,7 @@ static int zynqmp_qspi_probe(struct plat &tx_bus_width); if (!ret) { xqspi->tx_bus_width = tx_bus_width; + of_node_put(nc); break; } }