Skip to content

Commit

Permalink
USB: Remove BKL from usbdev_open()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 554f769 commit 063e20e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/usb/core/devio.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,6 @@ static int usbdev_open(struct inode *inode, struct file *file)
const struct cred *cred = current_cred();
int ret;

lock_kernel();

ret = -ENOMEM;
ps = kmalloc(sizeof(struct dev_state), GFP_KERNEL);
if (!ps)
Expand Down Expand Up @@ -713,15 +711,13 @@ static int usbdev_open(struct inode *inode, struct file *file)
usb_unlock_device(dev);
snoop(&dev->dev, "opened by process %d: %s\n", task_pid_nr(current),
current->comm);
unlock_kernel();
return ret;

out_unlock_device:
usb_unlock_device(dev);
usb_put_dev(dev);
out_free_ps:
kfree(ps);
unlock_kernel();
return ret;
}

Expand Down

0 comments on commit 063e20e

Please sign in to comment.