ChangeSet 1.1939.1.54, 2004/09/29 12:48:57-07:00, [EMAIL PROTECTED]

[PATCH] usb-serial: create_serial() return value trivial fix.

 create_serial() only returns NULL if there is no memory enough
to a new `usb_serial' structure, thus, the right error code to
return is -ENOMEM.

Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/serial/usb-serial.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c   2004-10-19 08:08:49 -07:00
+++ b/drivers/usb/serial/usb-serial.c   2004-10-19 08:08:49 -07:00
@@ -896,7 +896,7 @@
        serial = create_serial (dev, interface, type);
        if (!serial) {
                dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
-               return -ENODEV;
+               return -ENOMEM;
        }
 
        /* if this device type has a probe function, call it */



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to