Commit 3b8b2da5 authored by Luiz Capitulino's avatar Luiz Capitulino Committed by Greg Kroah-Hartman

[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: default avatarLuiz Capitulino <lcapitulino@conectiva.com.br>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent b0178e2c
...@@ -896,7 +896,7 @@ int usb_serial_probe(struct usb_interface *interface, ...@@ -896,7 +896,7 @@ int usb_serial_probe(struct usb_interface *interface,
serial = create_serial (dev, interface, type); serial = create_serial (dev, interface, type);
if (!serial) { if (!serial) {
dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__); dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
return -ENODEV; return -ENOMEM;
} }
/* if this device type has a probe function, call it */ /* if this device type has a probe function, call it */
......
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