From: Duncan Sands Date: Fri, 13 Jan 2006 09:07:08 +0000 (+0100) Subject: [PATCH] USBATM: return correct error code when out of memory X-Git-Tag: v2.6.16-rc2~207 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72ef8ab43f5a82e9e2dea247702bf433d6509f87;p=linux-2.6 [PATCH] USBATM: return correct error code when out of memory We weren't always returning -ENOMEM. Signed-off-by: Duncan Sands Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index e660a1ebf1..103764df47 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; }