]> www.infradead.org Git - users/dwmw2/linux.git/commit
usb: aspeed-vhub: Fix refcount leak bug in ast_vhub_init_desc()
authorLiang He <windhl@126.com>
Wed, 13 Jul 2022 12:05:28 +0000 (20:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2022 13:15:59 +0000 (15:15 +0200)
commite6db5780c2bf6e23be7b315809ef349b4b4f2213
tree185aba50d12b95be16547e2cc43a873304b69d7a
parentc818fa991c51e9c896137d9cd83d4b5973d878fb
usb: aspeed-vhub: Fix refcount leak bug in ast_vhub_init_desc()

[ Upstream commit 220fafb4ed04187e9c17be4152da5a7f2ffbdd8c ]

We should call of_node_put() for the reference returned by
of_get_child_by_name() which has increased the refcount.

Fixes: 30d2617fd7ed ("usb: gadget: aspeed: allow to set usb strings in device tree")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220713120528.368168-1-windhl@126.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/gadget/udc/aspeed-vhub/hub.c