public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
Cc: Michal Simek <monstr@monstr.eu>,
	 Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>,
	 Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
	 P L Sai Krishna <lakshmis@xilinx.com>,
	 Ranjit Waghmode <ranjit.waghmode@xilinx.com>,
	 Tejas Prajapati Rameshchandra
	<tejas.prajapati.rameshchandra@xilinx.com>,
	 Rajan Vaja <rajan.vaja@xilinx.com>,
	kbuild-all@lists.01.org,  linux-arm-kernel@lists.infradead.org
Subject: [PATCH] spi: fix for_each_child.cocci warnings
Date: Thu, 2 Sep 2021 18:54:21 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2109021851450.52031@hadrien> (raw)

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 <amit.kumar-mahapatra@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

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;
 		}
 	}

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-09-02 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 16:54 Julia Lawall [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-17 22:46 [PATCH] spi: fix for_each_child.cocci warnings kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2109021851450.52031@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=amit.kumar-mahapatra@xilinx.com \
    --cc=kbuild-all@lists.01.org \
    --cc=lakshmis@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=monstr@monstr.eu \
    --cc=naga.sureshkumar.relli@xilinx.com \
    --cc=rajan.vaja@xilinx.com \
    --cc=ranjit.waghmode@xilinx.com \
    --cc=shubhrajyoti.datta@xilinx.com \
    --cc=tejas.prajapati.rameshchandra@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox