Skip to content

Commit a55a9a4

Browse files
intel-lab-lkpgregkh
authored andcommitted
usb: gadget: aspeed: add missing of_node_put
Breaking out of for_each_child_of_node requires a put on the child value. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Fixes: 82c2d81 ("coccinelle: iterators: Add for_each_child.cocci script") 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]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2101211907060.14700@hadrien Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d8c6edf commit a55a9a4

File tree

1 file changed

+3
-1
lines changed
  • drivers/usb/gadget/udc/aspeed-vhub

1 file changed

+3
-1
lines changed

drivers/usb/gadget/udc/aspeed-vhub/hub.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,10 @@ static int ast_vhub_of_parse_str_desc(struct ast_vhub *vhub,
999999
str_array[offset].s = NULL;
10001000

10011001
ret = ast_vhub_str_alloc_add(vhub, &lang_str);
1002-
if (ret)
1002+
if (ret) {
1003+
of_node_put(child);
10031004
break;
1005+
}
10041006
}
10051007

10061008
return ret;

0 commit comments

Comments
 (0)