# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.580 -> 1.581 # drivers/usb/dabusb.c 1.6 -> 1.7 # drivers/usb/devices.c 1.6 -> 1.7 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/06/10 bhards@bigpond.net.au 1.581 # [PATCH] USB Checker missing unlocks fixes # # -------------------------------------------- # diff -Nru a/drivers/usb/dabusb.c b/drivers/usb/dabusb.c --- a/drivers/usb/dabusb.c Mon Jun 10 15:27:02 2002 +++ b/drivers/usb/dabusb.c Mon Jun 10 15:27:02 2002 @@ -605,6 +605,7 @@ } if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) { err("set_interface failed"); + up(&s->mutex); return -EINVAL; } s->opened = 1; diff -Nru a/drivers/usb/devices.c b/drivers/usb/devices.c --- a/drivers/usb/devices.c Mon Jun 10 15:27:02 2002 +++ b/drivers/usb/devices.c Mon Jun 10 15:27:02 2002 @@ -573,8 +573,10 @@ bus = list_entry(buslist, struct usb_bus, bus_list); /* recurse through all children of the root hub */ ret = usb_device_dump(&buf, &nbytes, &skip_bytes, ppos, bus->root_hub, bus, 0, 0, 0); - if (ret < 0) + if (ret < 0) { + up(&usb_bus_list_lock); return ret; + } total_written += ret; } up (&usb_bus_list_lock);