Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190363
b: refs/heads/master
c: d87ff58
h: refs/heads/master
i:
  190361: ca72e1b
  190359: a16cab9
v: v3
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Apr 27, 2010
1 parent 8ac32d5 commit 6980bde
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 2a9151572224ad5fe808058097be94106470a6dc
refs/heads/master: d87ff58fda926fe5cb01214cccf1c72422ac776d
15 changes: 8 additions & 7 deletions trunk/drivers/net/usb/ipheth.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,25 +122,25 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)

tx_urb = usb_alloc_urb(0, GFP_KERNEL);
if (tx_urb == NULL)
goto error;
goto error_nomem;

rx_urb = usb_alloc_urb(0, GFP_KERNEL);
if (rx_urb == NULL)
goto error;
goto free_tx_urb;

tx_buf = usb_buffer_alloc(iphone->udev,
IPHETH_BUF_SIZE,
GFP_KERNEL,
&tx_urb->transfer_dma);
if (tx_buf == NULL)
goto error;
goto free_rx_urb;

rx_buf = usb_buffer_alloc(iphone->udev,
IPHETH_BUF_SIZE,
GFP_KERNEL,
&rx_urb->transfer_dma);
if (rx_buf == NULL)
goto error;
goto free_tx_buf;


iphone->tx_urb = tx_urb;
Expand All @@ -149,13 +149,14 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)
iphone->rx_buf = rx_buf;
return 0;

error:
usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, rx_buf,
rx_urb->transfer_dma);
free_tx_buf:
usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
tx_urb->transfer_dma);
free_rx_urb:
usb_free_urb(rx_urb);
free_tx_urb:
usb_free_urb(tx_urb);
error_nomem:
return -ENOMEM;
}

Expand Down

0 comments on commit 6980bde

Please sign in to comment.