From patchwork Mon Feb 7 21:30:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12737912 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 930F7C433EF for ; Mon, 7 Feb 2022 21:31:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238118AbiBGVbX (ORCPT ); Mon, 7 Feb 2022 16:31:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237960AbiBGVbX (ORCPT ); Mon, 7 Feb 2022 16:31:23 -0500 X-Greylist: delayed 64 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 07 Feb 2022 13:31:21 PST Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52C4DC06173B; Mon, 7 Feb 2022 13:31:21 -0800 (PST) X-IronPort-AV: E=Sophos;i="5.88,350,1635199200"; d="scan'208";a="5266113" 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/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 22:30:16 +0100 Date: Mon, 7 Feb 2022 22:30:15 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Amit Kumar Mahapatra , Michal Simek , Naga Sureshkumar Relli , Mark Brown , linux-spi@vger.kernel.org cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] spi: spi-zynqmp-gqspi: 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-spi@vger.kernel.org From: kernel test robot for_each_available_child_of_node should have of_node_put() before break. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Fixes: f0fcd7d14036 ("spi: spi-zynqmp-gqspi: Fix suspend/resume") 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 xlnx_rebase_v5.15 head: 1183ce490adb103e5e569b8ebd74c50c885ddc05 commit: f0fcd7d140361b1f54cfd76afb8c3afc9bf218a5 [857/872] spi: spi-zynqmp-gqspi: Fix suspend/resume :::::: branch date: 3 days ago :::::: commit date: 3 days 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 @@ -1395,6 +1395,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; } } @@ -1407,6 +1408,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; } }