Commit 62a1f9ed authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB xpad: fix URB leak in open error path

 - fix error path in open
parent 90251935
......@@ -200,8 +200,10 @@ static int xpad_open (struct input_dev *dev)
return 0;
xpad->irq_in->dev = xpad->udev;
if (usb_submit_urb(xpad->irq_in, GFP_KERNEL))
if (usb_submit_urb(xpad->irq_in, GFP_KERNEL)) {
xpad->open_count--;
return -EIO;
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment