aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/cdc_ncm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/cdc_ncm.c')
-rw-r--r--drivers/net/usb/cdc_ncm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 593c104ab199..d776c4a8d3c1 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1021,13 +1021,15 @@ static int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
1021 (temp > CDC_NCM_MAX_DATAGRAM_SIZE) || (temp < ETH_HLEN)) { 1021 (temp > CDC_NCM_MAX_DATAGRAM_SIZE) || (temp < ETH_HLEN)) {
1022 pr_debug("invalid frame detected (ignored)" 1022 pr_debug("invalid frame detected (ignored)"
1023 "offset[%u]=%u, length=%u, skb=%p\n", 1023 "offset[%u]=%u, length=%u, skb=%p\n",
1024 x, offset, temp, skb); 1024 x, offset, temp, skb_in);
1025 if (!x) 1025 if (!x)
1026 goto error; 1026 goto error;
1027 break; 1027 break;
1028 1028
1029 } else { 1029 } else {
1030 skb = skb_clone(skb_in, GFP_ATOMIC); 1030 skb = skb_clone(skb_in, GFP_ATOMIC);
1031 if (!skb)
1032 goto error;
1031 skb->len = temp; 1033 skb->len = temp;
1032 skb->data = ((u8 *)skb_in->data) + offset; 1034 skb->data = ((u8 *)skb_in->data) + offset;
1033 skb_set_tail_pointer(skb, temp); 1035 skb_set_tail_pointer(skb, temp);