staging: vt6656: remove unnecessary 'out of memory' message
This patch fixes "Possible unnecessary 'out of memory' message" checkpatch.pl warning in main_usb.c Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8e4ec4fe04
commit
2ff6179f16
1 changed files with 2 additions and 8 deletions
|
@ -431,11 +431,8 @@ static bool vnt_alloc_bufs(struct vnt_private *priv)
|
||||||
for (ii = 0; ii < priv->num_tx_context; ii++) {
|
for (ii = 0; ii < priv->num_tx_context; ii++) {
|
||||||
tx_context = kmalloc(sizeof(struct vnt_usb_send_context),
|
tx_context = kmalloc(sizeof(struct vnt_usb_send_context),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (tx_context == NULL) {
|
if (tx_context == NULL)
|
||||||
dev_err(&priv->usb->dev,
|
|
||||||
"allocate tx usb context failed\n");
|
|
||||||
goto free_tx;
|
goto free_tx;
|
||||||
}
|
|
||||||
|
|
||||||
priv->tx_context[ii] = tx_context;
|
priv->tx_context[ii] = tx_context;
|
||||||
tx_context->priv = priv;
|
tx_context->priv = priv;
|
||||||
|
@ -471,10 +468,8 @@ static bool vnt_alloc_bufs(struct vnt_private *priv)
|
||||||
}
|
}
|
||||||
|
|
||||||
rcb->skb = dev_alloc_skb(priv->rx_buf_sz);
|
rcb->skb = dev_alloc_skb(priv->rx_buf_sz);
|
||||||
if (rcb->skb == NULL) {
|
if (rcb->skb == NULL)
|
||||||
dev_err(&priv->usb->dev, "Failed to alloc rx skb\n");
|
|
||||||
goto free_rx_tx;
|
goto free_rx_tx;
|
||||||
}
|
|
||||||
|
|
||||||
rcb->in_use = false;
|
rcb->in_use = false;
|
||||||
|
|
||||||
|
@ -491,7 +486,6 @@ static bool vnt_alloc_bufs(struct vnt_private *priv)
|
||||||
|
|
||||||
priv->int_buf.data_buf = kmalloc(MAX_INTERRUPT_SIZE, GFP_KERNEL);
|
priv->int_buf.data_buf = kmalloc(MAX_INTERRUPT_SIZE, GFP_KERNEL);
|
||||||
if (priv->int_buf.data_buf == NULL) {
|
if (priv->int_buf.data_buf == NULL) {
|
||||||
dev_err(&priv->usb->dev, "Failed to alloc int buf\n");
|
|
||||||
usb_free_urb(priv->interrupt_urb);
|
usb_free_urb(priv->interrupt_urb);
|
||||||
goto free_rx_tx;
|
goto free_rx_tx;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue