Don't allow USB device drivers to parent own interface.

It will prevent proper USB device detach.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2020-05-28 08:05:46 +00:00
parent a37a5246ca
commit 5e0552018c

View File

@ -1402,7 +1402,7 @@ usbd_set_parent_iface(struct usb_device *udev, uint8_t iface_index,
{
struct usb_interface *iface;
if (udev == NULL) {
if (udev == NULL || iface_index == parent_index) {
/* nothing to do */
return;
}