Messages in this thread Patch in this message | | | Date | Mon, 27 Sep 2004 13:54:38 -0300 | From | "Luiz Fernando N. Capitulino" <> | Subject | [PATCH 2/5]: 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.
(against 2.6.9-rc2-mm4)
Signed-off-by: Luiz Capitulino <lcapitulino@conectiva.com.br>
drivers/usb/serial/usb-serial.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
diff -X /home/lcapitulino/kernels/2.6/dontdiff -Nparu a/drivers/usb/serial/usb-serial.c a~/drivers/usb/serial/usb-serial.c --- a/drivers/usb/serial/usb-serial.c 2004-09-26 13:13:21.000000000 -0300 +++ a~/drivers/usb/serial/usb-serial.c 2004-09-26 13:14:09.000000000 -0300 @@ -896,7 +896,7 @@ int usb_serial_probe(struct usb_interfac 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 */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |