projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d5ce77
)
USB: idmouse.c: Put the interface on error
author
Junjie Mao
<junjie.mao@enight.me>
Mon, 22 Feb 2016 02:48:45 +0000
(10:48 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 4 Mar 2016 03:44:06 +0000
(19:44 -0800)
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>
drivers/usb/misc/idmouse.c
patch
|
blob
|
history
diff --git
a/drivers/usb/misc/idmouse.c
b/drivers/usb/misc/idmouse.c
index 4e38683c653cf3b9dc614b2b3f4f1cf721cfac14..5105397e62fc764616fce38899747195cafcc553 100644
(file)
--- 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;