All of lore.kernel.org
 help / color / mirror / Atom feed
* sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352.
@ 2021-03-27 14:34 kernel test robot
  2021-03-27 14:34 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-03-27 14:34 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e
commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
date:   5 months ago
:::::: branch date: 19 hours ago
:::::: commit date: 5 months ago
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.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 >>)
>> sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352.

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 66368 bytes --]

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

* [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings
  2021-03-27 14:34 sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352 kernel test robot
@ 2021-03-27 14:34 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-27 14:34 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Liam Girdwood <lgirdwood@gmail.com>
CC: Mark Brown <broonie@kernel.org>
CC: Jaroslav Kysela <perex@perex.cz>
CC: Takashi Iwai <tiwai@suse.com>
CC: Ray Jui <rjui@broadcom.com>
CC: Scott Branden <sbranden@broadcom.com>
CC: bcm-kernel-feedback-list(a)broadcom.com
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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

sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352.


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

Fixes: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script")
CC: Sumera Priyadarsini <sylphrenadin@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e
commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
:::::: branch date: 19 hours ago
:::::: commit date: 5 months ago

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

 cygnus-ssp.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -1348,8 +1348,10 @@ static int cygnus_ssp_probe(struct platf
 					&cygnus_ssp_dai[active_port_count]);
 
 		/* negative is err, 0 is active and good, 1 is disabled */
-		if (err < 0)
+		if (err < 0) {
+			of_node_put(child_node);
 			return err;
+		}
 		else if (!err) {
 			dev_dbg(dev, "Activating DAI: %s\n",
 				cygnus_ssp_dai[active_port_count].name);

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

end of thread, other threads:[~2021-03-27 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 14:34 sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352 kernel test robot
2021-03-27 14:34 ` [PATCH] coccinelle: iterators: 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.