spi: spi-xilinx: fix for_each_child.cocci warnings
Subsystems (2)
PATCH 1/1 spi: spi-xilinx: fix for_each_child.cocci warnings
From: kernel test robot <[email protected]>
After for_each_available_child_of_node, of_node_put is needed before break and return.
Generated by: scripts/coccinelle/iterators/for_each_child.cocci
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15 head: 1183ce490adb103e5e569b8ebd74c50c885ddc05 commit: 3973536c456079bf3d09e9a97bf33d29422b183f [861/872] spi: spi-xilinx: Updated axi-qspi controller driver
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
spi-xilinx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/spi/spi-xilinx.c +4 -1
@@ -693,13 +693,16 @@ static int xilinx_spi_probe(struct platfif (startup_block) { ret =of_property_read_u32 (nc,"reg" , &cs_num); -if (ret <0 ) +if (ret <0 ) { +of_node_put (nc);return -EINVAL ; + } } ret =of_property_read_u32 (nc,"spi-rx-bus-width" , &rx_bus_width);if (!ret) { xspi->rx_bus_width = rx_bus_width; +of_node_put (nc);break ; } }
Quoted 6 lines · Julia Lawall
From: kernel test robot <[email protected]>
After
for_each_available_child_of_node,of_node_putis needed before break and return.
Quoted 7 lines
Generated by:
scripts/coccinelle/iterators/for_each_child.cocciFixes 3973536c4560 ("spi: spi-xilinx: Updated axi-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]>
Quoted 31 lines
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15 head: 1183ce490adb103e5e569b8ebd74c50c885ddc05 commit: 3973536c456079bf3d09e9a97bf33d29422b183f [861/872] spi: spi-xilinx: Updated axi-qspi controller driver:::::: branch date: 7 days ago
:::::: commit date: 7 days agospi-xilinx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/spi/spi-xilinx.c +4
-1@@ -693,13 +693,16 @@ static int xilinx_spi_probe(struct platfif (startup_block) { ret =of_property_read_u32 (nc,"reg" , &cs_num); -if (ret <0 ) +if (ret <0 ) { +of_node_put (nc);return -EINVAL ; + } } ret =of_property_read_u32 (nc,"spi-rx-bus-width" , &rx_bus_width);if (!ret) { xspi->rx_bus_width = rx_bus_width; +of_node_put (nc);break ; } }
Signature · 1 line
Ricardo Ribalda
Mark Brown
maintainerQuoted 9 lines · Ricardo Ribalda Delgado
Quoted 5 lines · Julia Lawall
Fixes 3973536c4560 ("spi: spi-xilinx: Updated axi-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]>Signed-off-by Ricardo Ribalda <[email protected]>
That's not what Signed-off-by means, you should only be adding a signoff if you're forwarding on a patch or you wrote it - please see Documentation/process/submitting-patches.rst for details on what this is and why it's important. You probably meant an ack or a review.
Hi Mark
Quoted 10 lines · Mark Brown
Quoted 7 lines · Ricardo Ribalda Delgado
Quoted 5 lines · Julia Lawall
Fixes 3973536c4560 ("spi: spi-xilinx: Updated axi-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]>
Quoted 6 lines
Quoted 1 line
Signed-off-by Ricardo Ribalda <[email protected]>That's not what Signed-off-by means, you should only be adding a signoff if you're forwarding on a patch or you wrote it - please see
Documentation/process/submitting-patches.rstfor details on what this is and why it's important. You probably meant an ack or a review.
Sorry, I pressed the wrong shortcut. My apologies.
I meant ack
Signature · 1 line
Ricardo Ribalda
Mark Brown
maintainerQuoted 4 lines · Julia Lawall
From: kernel test robot <[email protected]>
After
for_each_available_child_of_node,of_node_putis needed before break and return.
This doesn't apply against current code, please check and resend.