The open count will always be exactly one when release is called, so drop the redundant sanity check. Signed-off-by: Johan Hovold <johan@xxxxxxxxxx> --- drivers/usb/misc/idmouse.c | 6 ------ 1 file changed, 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) { -- 2.23.0