[patch 32/38] USB: fix pm counter leak in usblp

From: Greg KH
Date: Fri Feb 22 2008 - 19:49:31 EST


2.6.24-stable review patch. If anyone has any objections, please let us
know.

------------------
From: Oliver Neukum <oliver@xxxxxxxxxx>

commit 1902869019918411c148c18cc3a22aade569ac9a upstream

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

Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>
Signed-off-by: Pete Zaitcev <zaitcev@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/usb/class/usblp.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -428,6 +428,7 @@ static int usblp_open(struct inode *inod
usblp->rcomplete = 0;

if (handle_bidir(usblp) < 0) {
+ usb_autopm_put_interface(intf);
usblp->used = 0;
file->private_data = NULL;
retval = -EIO;

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/