USB: fix pm counter leak in usblp

if you fail in open() you must decrement the pm counter again.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
This commit is contained in:
Oliver Neukum 2008-02-12 19:08:30 +01:00 committed by Greg Kroah-Hartman
parent 2129c4e1b4
commit 1902869019

View File

@ -428,6 +428,7 @@ static int usblp_open(struct inode *inode, struct file *file)
usblp->rcomplete = 0;
if (handle_bidir(usblp) < 0) {
usb_autopm_put_interface(intf);
usblp->used = 0;
file->private_data = NULL;
retval = -EIO;