Commit 6710f773 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20191105103638.4929-3-johan@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 79c36a70
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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) {