summaryrefslogtreecommitdiff
path: root/drivers/net/usb/asix_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/asix_common.c')
-rw-r--r--drivers/net/usb/asix_common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
index 125cff57c759..7847436c441e 100644
--- a/drivers/net/usb/asix_common.c
+++ b/drivers/net/usb/asix_common.c
@@ -113,7 +113,6 @@ int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,
while (offset + sizeof(u16) <= skb->len) {
u16 copy_length;
- unsigned char *data;
if (!rx->remaining) {
if (skb->len - offset == sizeof(u16)) {
@@ -167,8 +166,8 @@ int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,
}
if (rx->ax_skb) {
- data = skb_put(rx->ax_skb, copy_length);
- memcpy(data, skb->data + offset, copy_length);
+ skb_put_data(rx->ax_skb, skb->data + offset,
+ copy_length);
if (!rx->remaining)
usbnet_skb_return(dev, rx->ax_skb);
}