]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: fix pm counter leak in usblp
authorOliver Neukum <oliver@neukum.org>
Tue, 12 Feb 2008 18:08:30 +0000 (19:08 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Feb 2008 23:38:48 +0000 (15:38 -0800)
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>
drivers/usb/class/usblp.c

index ad632f2d6f94534e61a5ff6241a9671f517b1eea..0647164d36db562758cde201619d98e5ed9327a1 100644 (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;