USB: core: fix device node leak
authorJohan Hovold <johan@kernel.org>
Tue, 6 Jun 2017 15:58:58 +0000 (17:58 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 03:07:57 +0000 (03:07 +0000)
commit5125a28f6e22d9a717a14be59ab45d5d6f7b2f7e
treed1b64ffad84057f8a28858a7ba1c7f7c9c8cc6f3
parentb81508e1af5a060b4309a5bbdc5a4851a10621db
USB: core: fix device node leak

commit e271b2c909a22a2c13b2d5f77f2ce0091b74540c upstream.

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: 69bec7259853 ("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>
drivers/usb/core/usb.c