spi: fix for_each_child.cocci warnings
Subsystems (2)
PATCH 1/1 spi: fix for_each_child.cocci warnings
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 <[email protected]>
Reported-by kernel test robot <[email protected]>
Signed-off-by kernel test robot <[email protected]>
Signed-off-by Julia Lawall <[email protected]>
---
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(+)
drivers/spi/spi-zynqmp-gqspi.c +2 -0
@@ -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 ; } }