aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/idmouse.c
diff options
context:
space:
mode:
authorJohan Hovold <[email protected]>2019-11-05 10:36:37 +0000
committerGreg Kroah-Hartman <[email protected]>2019-11-07 10:16:49 +0000
commit6710f773b51f21ad7d10198ca6424bea7faaf9d4 (patch)
tree773d50219b3520e06fc45d7e35f07d143c491283 /drivers/usb/misc/idmouse.c
parentUSB: idmouse: simplify disconnect handling (diff)
downloadkernel-6710f773b51f21ad7d10198ca6424bea7faaf9d4.tar.gz
kernel-6710f773b51f21ad7d10198ca6424bea7faaf9d4.zip
USB: idmouse: drop redundant open-count check from release
The open count will always be exactly one when release is called, so drop the redundant sanity check. Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/misc/idmouse.c')
-rw-r--r--drivers/usb/misc/idmouse.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c
index 0386bac224c4..9b9d5df829d5 100644
--- 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) {