Skip to contentSkip to conversation

patch "usb: gadget: aspeed: add missing of_node_put" added to usb-linus

PATCH [email protected] 1 participant 1 message Jan 26, 2021

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: gadget: aspeed: add missing of_node_put

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From a55a9a4c5c6253f6e4dea268af728664ac997790 Mon Sep 17 00:00:00 2001
From: kernel test robot <[email protected]>
Date: Thu, 21 Jan 2021 19:12:54 +0100
Subject: 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

---
 drivers/usb/gadget/udc/aspeed-vhub/hub.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/gadget/udc/aspeed-vhub/hub.c +3 -1
index 6497185ec4e7..bfd8e77788e2 100644
@@ -999,8 +999,10 @@ static int ast_vhub_of_parse_str_desc(struct ast_vhub *vhub,
 		str_array[offset].s = NULL;
 
 		ret = ast_vhub_str_alloc_add(vhub, &lang_str);
-		if (ret)
+		if (ret) {
+			of_node_put(child);
 			break;
+		}
 	}
 
 	return ret;
Signature · 1 line
2.30.0