Skip to content

Commit

Permalink
ASoC: cygnus: fix for_each_child.cocci warnings
Browse files Browse the repository at this point in the history
Function "for_each_available_child_of_node" should have of_node_put()
before return around line 1352.

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

CC: Sumera Priyadarsini <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
Signed-off-by: Julia Lawall <[email protected]>
Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2103281651320.2854@hadrien
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
intel-lab-lkp authored and broonie committed Mar 29, 2021
1 parent 3a27875 commit aa320c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/soc/bcm/cygnus-ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,8 +1348,10 @@ static int cygnus_ssp_probe(struct platform_device *pdev)
&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);
Expand Down

0 comments on commit aa320c7

Please sign in to comment.