lkml.org 
[lkml]   [2004]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/
\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.026 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site