diff options
author | Duncan Sands <baldrick@free.fr> | 2006-01-13 10:07:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-02-01 02:23:39 +0100 |
commit | 72ef8ab43f5a82e9e2dea247702bf433d6509f87 (patch) | |
tree | 3bd0837a41fa63747fcda1d7f678abe47398f937 /drivers/usb/atm/usbatm.c | |
parent | [PATCH] USBATM: shutdown open connections when disconnected (diff) | |
download | linux-72ef8ab43f5a82e9e2dea247702bf433d6509f87.tar.xz linux-72ef8ab43f5a82e9e2dea247702bf433d6509f87.zip |
[PATCH] USBATM: return correct error code when out of memory
We weren't always returning -ENOMEM.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/atm/usbatm.c')
-rw-r--r-- | drivers/usb/atm/usbatm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index e660a1ebf12b..103764df47ea 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c @@ -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; } |