summaryrefslogtreecommitdiff
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorJunjie Mao <junjie.mao@enight.me>2016-02-22 05:48:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-04 06:44:06 +0300
commit0b41d35058468cb9cab3f856b3446a68416213e4 (patch)
treec98e027ce054be3fee9fda71266e3ca4ba7c5269 /drivers/usb/misc
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')
-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 4e38683c653c..5105397e62fc 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;