xhci: xhci debugfs device nodes weren't removed after device plugged out
authorZhengjun Xing <zhengjun.xing@linux.intel.com>
Mon, 12 Feb 2018 12:24:50 +0000 (14:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:15:43 +0000 (11:15 +0100)
commit11474eb609f4a7469d85109347f74ee8972925fa
tree45dfcc708c6b12504837bab5bf08086de52a50c9
parent99cfcdcbfb385181a375207a61e3abc2e1428c29
xhci: xhci debugfs device nodes weren't removed after device plugged out

commit 8c5a93ebf7ac56d47f879b3c7c2f8c83b40c2cdb upstream.

There is a bug after plugged out USB device, the device and its ep00
nodes are still kept, we need to remove the nodes in xhci_free_dev when
USB device is plugged out.

Fixes: 052f71e25a7e ("xhci: Fix xhci debugfs NULL pointer dereference in resume from hibernate")
Cc: <stable@vger.kernel.org> # v4.15
Signed-off-by: Zhengjun Xing <zhengjun.xing@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c