USB: core: fix device node leak
authorJohan Hovold <johan@kernel.org>
Tue, 6 Jun 2017 15:58:58 +0000 (17:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Jun 2017 09:07:32 +0000 (11:07 +0200)
commite271b2c909a22a2c13b2d5f77f2ce0091b74540c
tree4ebe90566ce8f5fc66d40760466abc1b47884683
parent0bd08fc8db593eb79bd40729279016fd5d7edc09
USB: core: fix device node leak

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")
Cc: stable <stable@vger.kernel.org> # v4.6
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