Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268783
b: refs/heads/master
c: ca45e70
h: refs/heads/master
i:
  268781: 37e6578
  268779: 9684912
  268775: bbe0868
  268767: 78f0e70
v: v3
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Oct 11, 2011
1 parent 85cdab3 commit f1c610f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f969f84ed92e55040dbf51398ba2d8f5d23bf498
refs/heads/master: ca45e70029b3d96923953992c05a2515dd3d9f24
16 changes: 10 additions & 6 deletions trunk/drivers/staging/bcm/InterfaceInit.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,23 +280,27 @@ static int AllocUsbCb(PS_INTERFACE_ADAPTER psIntfAdapter)
int i = 0;

for (i = 0; i < MAXIMUM_USB_TCB; i++) {
if ((psIntfAdapter->asUsbTcb[i].urb =
usb_alloc_urb(0, GFP_KERNEL)) == NULL) {
psIntfAdapter->asUsbTcb[i].urb = usb_alloc_urb(0, GFP_KERNEL);

if (psIntfAdapter->asUsbTcb[i].urb == NULL) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0,
"Can't allocate Tx urb for index %d\n", i);
return -ENOMEM;
}
}

for (i = 0; i < MAXIMUM_USB_RCB; i++) {
if ((psIntfAdapter->asUsbRcb[i].urb =
usb_alloc_urb(0, GFP_KERNEL)) == NULL) {
psIntfAdapter->asUsbRcb[i].urb = usb_alloc_urb(0, GFP_KERNEL);

if (psIntfAdapter->asUsbRcb[i].urb == NULL) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0,
"Can't allocate Rx urb for index %d\n", i);
return -ENOMEM;
}
if ((psIntfAdapter->asUsbRcb[i].urb->transfer_buffer =
kmalloc(MAX_DATA_BUFFER_SIZE, GFP_KERNEL)) == NULL) {

psIntfAdapter->asUsbRcb[i].urb->transfer_buffer = kmalloc(MAX_DATA_BUFFER_SIZE, GFP_KERNEL);

if (psIntfAdapter->asUsbRcb[i].urb->transfer_buffer == NULL) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0,
"Can't allocate Rx buffer for index %d\n", i);
return -ENOMEM;
Expand Down

0 comments on commit f1c610f

Please sign in to comment.