mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
USB: core: fix device node leak
commite271b2c909upstream. Make sure to release any OF device-node reference taken when creating the USB device. Note that we currently do not hold a reference to the root hub device-tree node (i.e. the parent controller node). Fixes:69bec72598("USB: core: let USB device know device node") Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
18b3abb543
commit
d84e328c02
@@ -279,6 +279,8 @@ static void usb_release_dev(struct device *dev)
|
||||
|
||||
usb_destroy_configuration(udev);
|
||||
usb_release_bos_descriptor(udev);
|
||||
if (udev->parent)
|
||||
of_node_put(dev->of_node);
|
||||
usb_put_hcd(hcd);
|
||||
kfree(udev->product);
|
||||
kfree(udev->manufacturer);
|
||||
|
||||
Reference in New Issue
Block a user