Commit 781aa5f1 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Linus Torvalds

[PATCH] USB: fix up previous pl2303 fix.

This returns the proper value, and fixes a memory leak.
parent 4972af26
......@@ -1237,7 +1237,6 @@ int usb_serial_probe(struct usb_interface *interface,
}
#if defined(CONFIG_USB_SERIAL_PL2303) || defined(CONFIG_USB_SERIAL_PL2303_MODULE)
#if 1
/* BEGIN HORRIBLE HACK FOR PL2303 */
/* this is needed due to the looney way its endpoints are set up */
if (((dev->descriptor.idVendor == PL2303_VENDOR_ID) &&
......@@ -1268,11 +1267,11 @@ int usb_serial_probe(struct usb_interface *interface,
*/
if (num_bulk_in == 0 || num_bulk_out == 0) {
info("PL-2303 hack: descriptors matched but endpoints did not");
return NULL;
kfree (serial);
return -ENODEV;
}
}
/* END HORRIBLE HACK FOR PL2303 */
#endif
#endif
/* found all that we need */
......
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