All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: versal-sysmon: fix for_each_child.cocci warnings
  2022-02-12 21:32 [xilinx-xlnx:xlnx_rebase_v5.15 543/923] drivers/iio/adc/versal-sysmon.c:876:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 879 kernel test robot
@ 2022-02-12 21:28 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-12 21:28 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2111 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-arm-kernel(a)lists.infradead.org
TO: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>
CC: Dragan Cvetic <dragan.cvetic@xilinx.com>
CC: Jonathan Cameron <jic23@kernel.org>
CC: "Lars-Peter Clausen" <lars@metafoo.de>
CC: git(a)xilinx.com
CC: linux-iio(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/iio/adc/versal-sysmon.c:876:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 879.
drivers/iio/adc/versal-sysmon.c:876:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 883.


Semantic patch information:
 False positives can be due to function calls within the for_each
 loop that may encapsulate an of_node_put.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

CC: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head:   966124532656bc95d781abf57531e4cd4f962237
commit: 1459646ab280aa68c3c4fa1d9552ea21f15d7a2d [543/923] iio: versal-sysmon: add driver for Versal Sysmon
:::::: branch date: 3 days ago
:::::: commit date: 12 days ago

Please take the patch only if it's a positive warning. Thanks!

 versal-sysmon.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/drivers/iio/adc/versal-sysmon.c
+++ b/drivers/iio/adc/versal-sysmon.c
@@ -875,12 +875,16 @@ static int sysmon_parse_dt(struct iio_de
 
 	for_each_child_of_node(np, child_node) {
 		ret = of_property_read_u32(child_node, "reg", &reg);
-		if (ret < 0)
+		if (ret < 0) {
+			of_node_put(child_node);
 			return ret;
+		}
 
 		ret = of_property_read_string(child_node, "xlnx,name", &name);
-		if (ret < 0)
+		if (ret < 0) {
+			of_node_put(child_node);
 			return ret;
+		}
 
 		sysmon_channels[i].type = IIO_VOLTAGE;
 		sysmon_channels[i].indexed = 1;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [xilinx-xlnx:xlnx_rebase_v5.15 543/923] drivers/iio/adc/versal-sysmon.c:876:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 879.
@ 2022-02-12 21:32 kernel test robot
  2022-02-12 21:28 ` [PATCH] iio: versal-sysmon: fix for_each_child.cocci warnings kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-02-12 21:32 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-arm-kernel(a)lists.infradead.org
TO: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>
CC: Dragan Cvetic <dragan.cvetic@xilinx.com>

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head:   966124532656bc95d781abf57531e4cd4f962237
commit: 1459646ab280aa68c3c4fa1d9552ea21f15d7a2d [543/923] iio: versal-sysmon: add driver for Versal Sysmon
:::::: branch date: 3 days ago
:::::: commit date: 12 days ago
config: alpha-randconfig-c024-20220208 (https://download.01.org/0day-ci/archive/20220213/202202130525.AeZFNTY0-lkp(a)intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/iio/adc/versal-sysmon.c:876:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 879.
   drivers/iio/adc/versal-sysmon.c:876:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 883.

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-12 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-12 21:32 [xilinx-xlnx:xlnx_rebase_v5.15 543/923] drivers/iio/adc/versal-sysmon.c:876:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 879 kernel test robot
2022-02-12 21:28 ` [PATCH] iio: versal-sysmon: fix for_each_child.cocci warnings kernel test robot

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.