Skip to content

Commit

Permalink
USB: fix pm counter leak in usblp
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Feb 21, 2008
1 parent 2129c4e commit 1902869
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/class/usblp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1902869

Please sign in to comment.