staging: vt6656: s_nsBulkInUsbIoCompleteRead check that used sk_buff is clean and ready to reuse.

skb_push the headroom and trimmed back to 0

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Malcolm Priestley 2014-07-06 23:19:46 +01:00 committed by Greg Kroah-Hartman
parent 83e771fc88
commit 618ff9cebe

View file

@ -303,6 +303,9 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
spin_unlock_irqrestore(&priv->lock, flags);
return;
}
} else {
skb_push(rcb->skb, skb_headroom(rcb->skb));
skb_trim(rcb->skb, 0);
}
urb->transfer_buffer = skb_put(rcb->skb,