projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79c36a7
)
USB: idmouse: drop redundant open-count check from release
author
Johan Hovold
<johan@kernel.org>
Tue, 5 Nov 2019 10:36:37 +0000
(11:36 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 7 Nov 2019 10:16:49 +0000
(11:16 +0100)
The open count will always be exactly one when release is called, so
drop the redundant sanity check.
Signed-off-by: Johan Hovold <johan@kernel.org>
Link:
https://lore.kernel.org/r/20191105103638.4929-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/idmouse.c
patch
|
blob
|
history
diff --git
a/drivers/usb/misc/idmouse.c
b/drivers/usb/misc/idmouse.c
index
0386bac
..
9b9d5df
100644
(file)
--- a/
drivers/usb/misc/idmouse.c
+++ b/
drivers/usb/misc/idmouse.c
@@
-278,12
+278,6
@@
static int idmouse_release(struct inode *inode, struct file *file)
/* lock our device */
mutex_lock(&dev->lock);
- /* are we really open? */
- if (dev->open <= 0) {
- mutex_unlock(&dev->lock);
- return -ENODEV;
- }
-
--dev->open;
if (!dev->present) {