aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
authorWolfram Sang <wsa-dev@sang-engineering.com>2016-08-11 23:23:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-15 15:56:33 +0200
commit68d81dea4fc105666516146f6c5e91aa0fe1be02 (patch)
treec6abcfe8b879a0f3dd93e93786038d2b496a57be /drivers/staging/vt6656
parentstaging: rtl8192u: r8192U_core: don't print error when allocating urb fails (diff)
downloadlinux-dev-68d81dea4fc105666516146f6c5e91aa0fe1be02.tar.xz
linux-dev-68d81dea4fc105666516146f6c5e91aa0fe1be02.zip
staging: vt6656: main_usb: don't print error when allocating urb fails
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/main_usb.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index ac4fecb30d0e..0594828bdabf 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -440,10 +440,8 @@ static bool vnt_alloc_bufs(struct vnt_private *priv)
/* allocate URBs */
tx_context->urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!tx_context->urb) {
- dev_err(&priv->usb->dev, "alloc tx urb failed\n");
+ if (!tx_context->urb)
goto free_tx;
- }
tx_context->in_use = false;
}
@@ -462,10 +460,8 @@ static bool vnt_alloc_bufs(struct vnt_private *priv)
/* allocate URBs */
rcb->urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!rcb->urb) {
- dev_err(&priv->usb->dev, "Failed to alloc rx urb\n");
+ if (!rcb->urb)
goto free_rx_tx;
- }
rcb->skb = dev_alloc_skb(priv->rx_buf_sz);
if (!rcb->skb)
@@ -479,10 +475,8 @@ static bool vnt_alloc_bufs(struct vnt_private *priv)
}
priv->interrupt_urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!priv->interrupt_urb) {
- dev_err(&priv->usb->dev, "Failed to alloc int urb\n");
+ if (!priv->interrupt_urb)
goto free_rx_tx;
- }
priv->int_buf.data_buf = kmalloc(MAX_INTERRUPT_SIZE, GFP_KERNEL);
if (!priv->int_buf.data_buf) {