ChangeSet 1.1843.4.29, 2004/08/25 10:48:14-07:00, [EMAIL PROTECTED]
[PATCH] USB: Add missing cleanup to usb_register_root_hub()
This patch adds some simple cleanups that are missing for one of the error
case in usb_register_root_hub(). I would be very surprised if this code
ever gets executed, but we might as well be correct.
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
drivers/usb/core/hcd.c | 2 ++
1 files changed, 2 insertions(+)
diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.c 2004-08-26 16:41:02 -07:00
+++ b/drivers/usb/core/hcd.c 2004-08-26 16:41:02 -07:00
@@ -790,6 +790,8 @@
usb_dev->epmaxpacketin[0] = usb_dev->epmaxpacketout[0] = 64;
retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE);
if (retval != sizeof usb_dev->descriptor) {
+ usb_dev->bus->root_hub = NULL;
+ up (&usb_bus_list_lock);
dev_dbg (parent_dev, "can't read %s device descriptor %d\n",
usb_dev->dev.bus_id, retval);
return (retval < 0) ? retval : -EMSGSIZE;
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel