Commit 696089de authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: struct vnt_rcb remove unused in_use.

The variable merely toggles true to false and is unused.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/130a4078-2502-a381-46c4-b473815e153b@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1ec1242
......@@ -227,7 +227,6 @@ struct vnt_rcb {
void *priv;
struct urb *urb;
struct sk_buff *skb;
int in_use;
};
/* used to track bulk out irps */
......
......@@ -478,9 +478,6 @@ static int vnt_alloc_bufs(struct vnt_private *priv)
ret = -ENOMEM;
goto free_rx_tx;
}
rcb->in_use = false;
/* submit rx urb */
ret = vnt_submit_rx_urb(priv, rcb);
if (ret)
......
......@@ -393,10 +393,8 @@ static void vnt_submit_rx_urb_complete(struct urb *urb)
if (urb->actual_length) {
if (vnt_rx_data(priv, rcb, urb->actual_length)) {
rcb->skb = dev_alloc_skb(priv->rx_buf_sz);
if (!rcb->skb) {
rcb->in_use = false;
if (!rcb->skb)
return;
}
} else {
skb_push(rcb->skb, skb_headroom(rcb->skb));
skb_trim(rcb->skb, 0);
......@@ -406,11 +404,8 @@ static void vnt_submit_rx_urb_complete(struct urb *urb)
skb_tailroom(rcb->skb));
}
if (usb_submit_urb(urb, GFP_ATOMIC)) {
if (usb_submit_urb(urb, GFP_ATOMIC))
dev_dbg(&priv->usb->dev, "Failed to re submit rx skb\n");
rcb->in_use = false;
}
}
int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
......@@ -433,13 +428,8 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
rcb);
ret = usb_submit_urb(urb, GFP_ATOMIC);
if (ret) {
if (ret)
dev_dbg(&priv->usb->dev, "Submit Rx URB failed %d\n", ret);
goto end;
}
rcb->in_use = true;
end:
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment