Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b41d350 authored by Junjie Mao's avatar Junjie Mao Committed by Greg Kroah-Hartman
Browse files

USB: idmouse.c: Put the interface on error



usb_autopm_put_interface() should be called regardless of what
idmouse_create_image() returns.

Signed-off-by: default avatarJunjie Mao <junjie.mao@enight.me>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0d5ce778
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -257,9 +257,9 @@ static int idmouse_open(struct inode *inode, struct file *file)
		if (result)
			goto error;
		result = idmouse_create_image (dev);
		usb_autopm_put_interface(interface);
		if (result)
			goto error;
		usb_autopm_put_interface(interface);

		/* increment our usage count for the driver */
		++dev->open;