diff options
Diffstat (limited to 'drivers/net/usb/hso.c')
-rw-r--r-- | drivers/net/usb/hso.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index cd8ccb240f4b..41e5dfb5ee64 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -2317,10 +2317,8 @@ static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, | |||
2317 | serial->rx_urb[i]->transfer_buffer_length = 0; | 2317 | serial->rx_urb[i]->transfer_buffer_length = 0; |
2318 | serial->rx_data[i] = kzalloc(serial->rx_data_length, | 2318 | serial->rx_data[i] = kzalloc(serial->rx_data_length, |
2319 | GFP_KERNEL); | 2319 | GFP_KERNEL); |
2320 | if (!serial->rx_data[i]) { | 2320 | if (!serial->rx_data[i]) |
2321 | dev_err(dev, "%s - Out of memory\n", __func__); | ||
2322 | goto exit; | 2321 | goto exit; |
2323 | } | ||
2324 | } | 2322 | } |
2325 | 2323 | ||
2326 | /* TX, allocate urb and initialize */ | 2324 | /* TX, allocate urb and initialize */ |
@@ -2336,15 +2334,12 @@ static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, | |||
2336 | serial->tx_buffer_count = 0; | 2334 | serial->tx_buffer_count = 0; |
2337 | serial->tx_data_length = tx_size; | 2335 | serial->tx_data_length = tx_size; |
2338 | serial->tx_data = kzalloc(serial->tx_data_length, GFP_KERNEL); | 2336 | serial->tx_data = kzalloc(serial->tx_data_length, GFP_KERNEL); |
2339 | if (!serial->tx_data) { | 2337 | if (!serial->tx_data) |
2340 | dev_err(dev, "%s - Out of memory\n", __func__); | ||
2341 | goto exit; | 2338 | goto exit; |
2342 | } | 2339 | |
2343 | serial->tx_buffer = kzalloc(serial->tx_data_length, GFP_KERNEL); | 2340 | serial->tx_buffer = kzalloc(serial->tx_data_length, GFP_KERNEL); |
2344 | if (!serial->tx_buffer) { | 2341 | if (!serial->tx_buffer) |
2345 | dev_err(dev, "%s - Out of memory\n", __func__); | ||
2346 | goto exit; | 2342 | goto exit; |
2347 | } | ||
2348 | 2343 | ||
2349 | return 0; | 2344 | return 0; |
2350 | exit: | 2345 | exit: |
@@ -2580,10 +2575,8 @@ static struct hso_device *hso_create_net_device(struct usb_interface *interface, | |||
2580 | } | 2575 | } |
2581 | hso_net->mux_bulk_rx_buf_pool[i] = kzalloc(MUX_BULK_RX_BUF_SIZE, | 2576 | hso_net->mux_bulk_rx_buf_pool[i] = kzalloc(MUX_BULK_RX_BUF_SIZE, |
2582 | GFP_KERNEL); | 2577 | GFP_KERNEL); |
2583 | if (!hso_net->mux_bulk_rx_buf_pool[i]) { | 2578 | if (!hso_net->mux_bulk_rx_buf_pool[i]) |
2584 | dev_err(&interface->dev, "Could not allocate rx buf\n"); | ||
2585 | goto exit; | 2579 | goto exit; |
2586 | } | ||
2587 | } | 2580 | } |
2588 | hso_net->mux_bulk_tx_urb = usb_alloc_urb(0, GFP_KERNEL); | 2581 | hso_net->mux_bulk_tx_urb = usb_alloc_urb(0, GFP_KERNEL); |
2589 | if (!hso_net->mux_bulk_tx_urb) { | 2582 | if (!hso_net->mux_bulk_tx_urb) { |
@@ -2591,10 +2584,8 @@ static struct hso_device *hso_create_net_device(struct usb_interface *interface, | |||
2591 | goto exit; | 2584 | goto exit; |
2592 | } | 2585 | } |
2593 | hso_net->mux_bulk_tx_buf = kzalloc(MUX_BULK_TX_BUF_SIZE, GFP_KERNEL); | 2586 | hso_net->mux_bulk_tx_buf = kzalloc(MUX_BULK_TX_BUF_SIZE, GFP_KERNEL); |
2594 | if (!hso_net->mux_bulk_tx_buf) { | 2587 | if (!hso_net->mux_bulk_tx_buf) |
2595 | dev_err(&interface->dev, "Could not allocate tx buf\n"); | ||
2596 | goto exit; | 2588 | goto exit; |
2597 | } | ||
2598 | 2589 | ||
2599 | add_net_device(hso_dev); | 2590 | add_net_device(hso_dev); |
2600 | 2591 | ||
@@ -2818,10 +2809,8 @@ struct hso_shared_int *hso_create_shared_int(struct usb_interface *interface) | |||
2818 | mux->shared_intr_buf = | 2809 | mux->shared_intr_buf = |
2819 | kzalloc(le16_to_cpu(mux->intr_endp->wMaxPacketSize), | 2810 | kzalloc(le16_to_cpu(mux->intr_endp->wMaxPacketSize), |
2820 | GFP_KERNEL); | 2811 | GFP_KERNEL); |
2821 | if (!mux->shared_intr_buf) { | 2812 | if (!mux->shared_intr_buf) |
2822 | dev_err(&interface->dev, "Could not allocate intr buf?\n"); | ||
2823 | goto exit; | 2813 | goto exit; |
2824 | } | ||
2825 | 2814 | ||
2826 | mutex_init(&mux->shared_int_lock); | 2815 | mutex_init(&mux->shared_int_lock); |
2827 | 2816 | ||