Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188048
b: refs/heads/master
c: c90c6a8
h: refs/heads/master
v: v3
  • Loading branch information
Thadeu Lima de Souza Cascardo authored and Dmitry Torokhov committed Mar 10, 2010
1 parent 18906ae commit 20bf0f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3dd1b39497b6820219581af16e6a8831a582bb3a
refs/heads/master: c90c6a885ac9827921e8f94f3ce4360ae11148f1
6 changes: 0 additions & 6 deletions trunk/drivers/input/mousedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/poll.h>
#include <linux/module.h>
#include <linux/init.h>
Expand Down Expand Up @@ -542,10 +541,8 @@ static int mousedev_open(struct inode *inode, struct file *file)
if (i >= MOUSEDEV_MINORS)
return -ENODEV;

lock_kernel();
error = mutex_lock_interruptible(&mousedev_table_mutex);
if (error) {
unlock_kernel();
return error;
}
mousedev = mousedev_table[i];
Expand All @@ -554,7 +551,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
mutex_unlock(&mousedev_table_mutex);

if (!mousedev) {
unlock_kernel();
return -ENODEV;
}

Expand All @@ -575,15 +571,13 @@ static int mousedev_open(struct inode *inode, struct file *file)
goto err_free_client;

file->private_data = client;
unlock_kernel();
return 0;

err_free_client:
mousedev_detach_client(mousedev, client);
kfree(client);
err_put_mousedev:
put_device(&mousedev->dev);
unlock_kernel();
return error;
}

Expand Down

0 comments on commit 20bf0f2

Please sign in to comment.