diff options
author | Johan Hovold <johan@kernel.org> | 2019-11-05 11:36:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-07 11:16:49 +0100 |
commit | 6710f773b51f21ad7d10198ca6424bea7faaf9d4 (patch) | |
tree | 773d50219b3520e06fc45d7e35f07d143c491283 /drivers/usb/misc | |
parent | 79c36a704a87533ba1551170354f3fb507ff5b70 (diff) | |
download | linux-6710f773b51f21ad7d10198ca6424bea7faaf9d4.tar.bz2 |
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 <johan@kernel.org>
Link: https://lore.kernel.org/r/20191105103638.4929-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/idmouse.c | 6 |
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) { |