summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/idmouse.c
diff options
context:
space:
mode:
authorJunjie Mao <junjie.mao@enight.me>2016-02-22 02:48:45 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-04 03:44:06 (GMT)
commit0b41d35058468cb9cab3f856b3446a68416213e4 (patch)
treec98e027ce054be3fee9fda71266e3ca4ba7c5269 /drivers/usb/misc/idmouse.c
parent0d5ce778c43bf888328231bcdce05d5c860655aa (diff)
downloadlinux-0b41d35058468cb9cab3f856b3446a68416213e4.tar.xz
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: Junjie Mao <junjie.mao@enight.me> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/idmouse.c')
-rw-r--r--drivers/usb/misc/idmouse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c
index 4e38683c..5105397 100644
--- a/drivers/usb/misc/idmouse.c
+++ b/drivers/usb/misc/idmouse.c
@@ -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;