lkml.org 
[lkml]   [2006]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/13] USBATM: return correct error code when out of memory
Date
We weren't always returning -ENOMEM.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Index: Linux/drivers/usb/atm/usbatm.c
===================================================================
--- Linux.orig/drivers/usb/atm/usbatm.c 2006-01-13 08:57:48.000000000 +0100
+++ Linux/drivers/usb/atm/usbatm.c 2006-01-13 08:59:16.000000000 +0100
@@ -1081,6 +1081,7 @@
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 @@
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;
}
\
 
 \ /
  Last update: 2006-01-13 10:10    [W:0.103 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site