usb: gadget: mbim: Remove duplicate unlock
Function mbim_notify should be called inside locked context, add missing lock. Also remove duplicate lock initialization. CRs-Fixed: 366821 Change-Id: I3431b20e831c807da7fa74cc40aa098f43330a9b Signed-off-by: Anna Perel <aperel@codeaurora.org>
This commit is contained in:
@@ -795,6 +795,7 @@ static void mbim_notify_complete(struct usb_ep *ep, struct usb_request *req)
|
||||
spin_unlock(&mbim->lock);
|
||||
mbim_clear_queues(mbim);
|
||||
mbim_reset_function_queue(mbim);
|
||||
spin_lock(&mbim->lock);
|
||||
break;
|
||||
default:
|
||||
pr_err("Unknown event %02x --> %d\n",
|
||||
@@ -1450,8 +1451,6 @@ int mbim_bind_config(struct usb_configuration *c, unsigned portno)
|
||||
|
||||
mbim->cdev = c->cdev;
|
||||
|
||||
spin_lock_init(&mbim->lock);
|
||||
|
||||
mbim_reset_values(mbim);
|
||||
|
||||
mbim->function.name = "usb_mbim";
|
||||
@@ -1615,6 +1614,7 @@ mbim_write(struct file *fp, const char __user *buf, size_t count, loff_t *pos)
|
||||
pr_debug("Exit(%d)", count);
|
||||
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
static int mbim_open(struct inode *ip, struct file *fp)
|
||||
|
||||
Reference in New Issue
Block a user