From: Julia Lawall <julia.lawall@inria.fr>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
Cc: kbuild-all@lists.01.org, lkp@intel.com,
linux-arm-kernel@lists.infradead.org,
Michal Simek <monstr@monstr.eu>,
Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>,
Tejas Prajapati Rameshchandra <tejaspra@xilinx.com>,
Naga Sureshkumar Relli <nagasure@xilinx.com>,
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] spi: spi-xilinx: fix for_each_child.cocci warnings
Date: Sun, 26 Jun 2022 10:18:46 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2206261016410.2194@hadrien> (raw)
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
Fixes: 3973536c4560 ("spi: spi-xilinx: Updated axi-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 xlnx_rebase_v5.15_LTS
head: 59523b5c4aca0174f1f8cba2a07d3b3328b7c80e
commit: 3973536c456079bf3d09e9a97bf33d29422b183f [861/1181] spi: spi-xilinx: Updated axi-qspi controller driver
:::::: branch date: 5 days ago
:::::: commit date: 5 months ago
Please take the patch only if it's a positive warning. Thanks!
drivers/spi/spi-xilinx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- 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;
}
}
WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
Cc: kbuild-all@lists.01.org, lkp@intel.com,
linux-arm-kernel@lists.infradead.org,
Michal Simek <monstr@monstr.eu>,
Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>,
Tejas Prajapati Rameshchandra <tejaspra@xilinx.com>,
Naga Sureshkumar Relli <nagasure@xilinx.com>,
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] spi: spi-xilinx: fix for_each_child.cocci warnings
Date: Sun, 26 Jun 2022 10:18:46 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2206261016410.2194@hadrien> (raw)
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
Fixes: 3973536c4560 ("spi: spi-xilinx: Updated axi-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 xlnx_rebase_v5.15_LTS
head: 59523b5c4aca0174f1f8cba2a07d3b3328b7c80e
commit: 3973536c456079bf3d09e9a97bf33d29422b183f [861/1181] spi: spi-xilinx: Updated axi-qspi controller driver
:::::: branch date: 5 days ago
:::::: commit date: 5 months ago
Please take the patch only if it's a positive warning. Thanks!
drivers/spi/spi-xilinx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- 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;
}
}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: kbuild-all@lists.01.org
Subject: [PATCH] spi: spi-xilinx: fix for_each_child.cocci warnings
Date: Sun, 26 Jun 2022 10:18:46 -0400 [thread overview]
Message-ID: <alpine.DEB.2.22.394.2206261016410.2194@hadrien> (raw)
[-- Attachment #1: Type: text/plain, Size: 1537 bytes --]
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
Fixes: 3973536c4560 ("spi: spi-xilinx: Updated axi-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 xlnx_rebase_v5.15_LTS
head: 59523b5c4aca0174f1f8cba2a07d3b3328b7c80e
commit: 3973536c456079bf3d09e9a97bf33d29422b183f [861/1181] spi: spi-xilinx: Updated axi-qspi controller driver
:::::: branch date: 5 days ago
:::::: commit date: 5 months ago
Please take the patch only if it's a positive warning. Thanks!
drivers/spi/spi-xilinx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- 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;
}
}
next reply other threads:[~2022-06-26 14:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-26 14:18 Julia Lawall [this message]
2022-06-26 14:18 ` [PATCH] spi: spi-xilinx: fix for_each_child.cocci warnings Julia Lawall
2022-06-26 14:18 ` Julia Lawall
2022-06-27 12:23 ` Mark Brown
2022-06-27 12:23 ` Mark Brown
2022-06-27 12:23 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2022-06-20 17:25 [xilinx-xlnx:xlnx_rebase_v5.15_LTS 861/1181] drivers/spi/spi-xilinx.c:692:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 697 kernel test robot
2022-06-20 17:19 ` [PATCH] spi: spi-xilinx: fix for_each_child.cocci warnings kernel test robot
2022-02-08 20:51 Julia Lawall
2022-02-08 20:51 ` Julia Lawall
2022-02-08 20:51 ` Julia Lawall
2022-02-09 10:33 ` Ricardo Ribalda Delgado
2022-02-09 10:33 ` Ricardo Ribalda Delgado
2022-02-09 10:33 ` Ricardo Ribalda Delgado
2022-02-09 13:12 ` Mark Brown
2022-02-09 13:12 ` Mark Brown
2022-02-09 13:12 ` Mark Brown
2022-02-09 13:52 ` Ricardo Ribalda Delgado
2022-02-09 13:52 ` Ricardo Ribalda Delgado
2022-02-09 13:52 ` Ricardo Ribalda Delgado
2022-02-09 13:25 ` Mark Brown
2022-02-09 13:25 ` Mark Brown
2022-02-09 13:25 ` Mark Brown
2022-02-08 11:28 [xilinx-xlnx:xlnx_rebase_v5.15 861/872] drivers/spi/spi-xilinx.c:692:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 697 kernel test robot
2022-02-08 11:23 ` [PATCH] spi: spi-xilinx: 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.2206261016410.2194@hadrien \
--to=julia.lawall@inria.fr \
--cc=amit.kumar-mahapatra@xilinx.com \
--cc=broonie@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=lakshmi.sai.krishna.potthuri@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=monstr@monstr.eu \
--cc=nagasure@xilinx.com \
--cc=ricardo.ribalda@gmail.com \
--cc=shubhrajyoti.datta@xilinx.com \
--cc=tejaspra@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.