Message ID | alpine.DEB.2.22.394.2206261016410.2194@hadrien (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | spi: spi-xilinx: fix for_each_child.cocci warnings | expand |
On Sun, Jun 26, 2022 at 10:18:46AM -0400, Julia Lawall wrote: > From: kernel test robot <lkp@intel.com> > > for_each_available_child_of_node should have of_node_put() before return around line 697. > for_each_available_child_of_node should have of_node_put() before break around line 703. > > Generated by: scripts/coccinelle/iterators/for_each_child.cocci This doesn't apply against current code, please check and resend.
--- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c @@ -693,13 +693,16 @@ static int xilinx_spi_probe(struct platf if (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; } }