]> err.no Git - linux-2.6/commitdiff
[PATCH] USBATM: return correct error code when out of memory
authorDuncan Sands <baldrick@free.fr>
Fri, 13 Jan 2006 09:07:08 +0000 (10:07 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 1 Feb 2006 01:23:39 +0000 (17:23 -0800)
We weren't always returning -ENOMEM.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/atm/usbatm.c

index e660a1ebf12bcef9227fa8cb3eecc86dd9d2fc0a..103764df47ead0ec48f1367047268b1e04f63c3b 100644 (file)
@@ -1081,6 +1081,7 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
                urb = usb_alloc_urb(iso_packets, GFP_KERNEL);
                if (!urb) {
                        dev_err(dev, "%s: no memory for urb %d!\n", __func__, i);
+                       error = -ENOMEM;
                        goto fail_unbind;
                }
 
@@ -1090,6 +1091,7 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
                buffer = kzalloc(channel->buf_size, GFP_KERNEL);
                if (!buffer) {
                        dev_err(dev, "%s: no memory for buffer %d!\n", __func__, i);
+                       error = -ENOMEM;
                        goto fail_unbind;
                }