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>
This commit is contained in:
parent
0d5ce778c4
commit
0b41d35058
1 changed files with 1 additions and 1 deletions
|
@ -257,9 +257,9 @@ static int idmouse_open(struct inode *inode, struct file *file)
|
||||||
if (result)
|
if (result)
|
||||||
goto error;
|
goto error;
|
||||||
result = idmouse_create_image (dev);
|
result = idmouse_create_image (dev);
|
||||||
|
usb_autopm_put_interface(interface);
|
||||||
if (result)
|
if (result)
|
||||||
goto error;
|
goto error;
|
||||||
usb_autopm_put_interface(interface);
|
|
||||||
|
|
||||||
/* increment our usage count for the driver */
|
/* increment our usage count for the driver */
|
||||||
++dev->open;
|
++dev->open;
|
||||||
|
|
Loading…
Reference in a new issue