Commit 3db8f6ff authored by Brad Hards's avatar Brad Hards Committed by David S. Miller

[PATCH] USB Checker missing unlocks fixes

parent 8ed75a58
......@@ -574,8 +574,10 @@ static ssize_t usb_device_read(struct file *file, char *buf, size_t nbytes, loff
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);
......
......@@ -609,6 +609,7 @@ static int dabusb_open (struct inode *inode, struct file *file)
down (&s->mutex);
}
if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) {
up(&s->mutex);
err("set_interface failed");
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment