mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 16:58:53 +00:00
USB: Remove BKL from usbdev_open()
Locking had long been changed making BKL redundant. Simply remove it. Signed-off-by: Oliver Neukum <oliver@neukum.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
554f76962d
commit
063e20eb98
@ -653,8 +653,6 @@ static int usbdev_open(struct inode *inode, struct file *file)
|
|||||||
const struct cred *cred = current_cred();
|
const struct cred *cred = current_cred();
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
ps = kmalloc(sizeof(struct dev_state), GFP_KERNEL);
|
ps = kmalloc(sizeof(struct dev_state), GFP_KERNEL);
|
||||||
if (!ps)
|
if (!ps)
|
||||||
@ -713,7 +711,6 @@ static int usbdev_open(struct inode *inode, struct file *file)
|
|||||||
usb_unlock_device(dev);
|
usb_unlock_device(dev);
|
||||||
snoop(&dev->dev, "opened by process %d: %s\n", task_pid_nr(current),
|
snoop(&dev->dev, "opened by process %d: %s\n", task_pid_nr(current),
|
||||||
current->comm);
|
current->comm);
|
||||||
unlock_kernel();
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
out_unlock_device:
|
out_unlock_device:
|
||||||
@ -721,7 +718,6 @@ static int usbdev_open(struct inode *inode, struct file *file)
|
|||||||
usb_put_dev(dev);
|
usb_put_dev(dev);
|
||||||
out_free_ps:
|
out_free_ps:
|
||||||
kfree(ps);
|
kfree(ps);
|
||||||
unlock_kernel();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user