Browse Source

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>
Oliver Neukum 17 years ago
parent
commit
1902869019
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/usb/class/usblp.c

+ 1 - 0
drivers/usb/class/usblp.c

@@ -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;