[PATCH] USBATM: return correct error code when out of memory

We weren't always returning -ENOMEM.

Signed-off-by: Duncan Sands <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---
commit 72ef8ab43f5a82e9e2dea247702bf433d6509f87
tree 3bd0837a41fa63747fcda1d7f678abe47398f937
parent 0e42a627ec3d8defa0c43cff94b8f2080a070716
author Duncan Sands <[EMAIL PROTECTED]> Fri, 13 Jan 2006 10:07:08 +0100
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Tue, 31 Jan 2006 17:23:39 -0800

 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 e660a1e..103764d 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -1081,6 +1081,7 @@ int usbatm_usb_probe(struct usb_interfac
                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_interfac
                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;
                }
 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to