ChangeSet 1.738.5.23, 2002/10/13 13:44:34-07:00, [EMAIL PROTECTED]

[PATCH] USB: fix up previous pl2303 fix.

This returns the proper value, and fixes a memory leak.


diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c   Sun Oct 13 17:08:52 2002
+++ b/drivers/usb/serial/usb-serial.c   Sun Oct 13 17:08:52 2002
@@ -1237,7 +1237,6 @@
        }
 
 #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 @@
                 */
                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 */


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to