summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/inode.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-05-02 14:16:37 +0200
committerTejun Heo <tj@kernel.org>2011-05-02 14:16:47 +0200
commitba67cf5cf2ce10ad86a212b70f8c7c75d93a5016 (patch)
tree70242f5927c6d6454bd352ff78f956cfc5238f59 /drivers/usb/gadget/inode.c
parentaff364860aa105b2deacc6f21ec8ef524460e3fc (diff)
parent2be19102b71c1a45d37fec50303791daa1a06869 (diff)
downloadop-kernel-dev-ba67cf5cf2ce10ad86a212b70f8c7c75d93a5016.zip
op-kernel-dev-ba67cf5cf2ce10ad86a212b70f8c7c75d93a5016.tar.gz
Merge branch 'x86/urgent' into x86-mm
Merge reason: Pick up the following two fix commits. 2be19102b7: x86, NUMA: Fix empty memblk detection in numa_cleanup_meminfo() 765af22da8: x86-32, NUMA: Fix ACPI NUMA init broken by recent x86-64 change Scheduled NUMA init 32/64bit unification changes depend on these. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/usb/gadget/inode.c')
-rw-r--r--drivers/usb/gadget/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index 3ed73f4..a01383f 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -386,8 +386,10 @@ ep_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
/* halt any endpoint by doing a "wrong direction" i/o call */
if (usb_endpoint_dir_in(&data->desc)) {
- if (usb_endpoint_xfer_isoc(&data->desc))
+ if (usb_endpoint_xfer_isoc(&data->desc)) {
+ mutex_unlock(&data->lock);
return -EINVAL;
+ }
DBG (data->dev, "%s halt\n", data->name);
spin_lock_irq (&data->dev->lock);
if (likely (data->ep != NULL))
OpenPOWER on IntegriCloud