[PATCH 1/6] USB: Fix stale usb devices in usb_device_list
Sebastian Hesselbarth
sebastian.hesselbarth at gmail.com
Thu Jul 24 06:28:41 PDT 2014
New usb devices are added to a list of usb devices, but when removing
the corresponding usb_device it was not removed from that list. Fix it
by deleting it properly from the usb_device_list.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
---
To: Sascha Hauer <s.hauer at pengutronix.de>
Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Cc: Ezequiel Garcia <ezequiel.garcia at free-electrons.com>
Cc: barebox at lists.infradead.org
---
drivers/usb/core/usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 351e783b6536..2cc338465539 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -472,6 +472,7 @@ void usb_remove_device(struct usb_device *usbdev)
dev_err(&usbdev->dev, "failed to unregister\n");
usbdev->parent->children[usbdev->portnr - 1] = NULL;
+ list_del(&usbdev->list);
free(usbdev);
}
--
2.0.0
More information about the barebox
mailing list