aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/can/mscan
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can/mscan')
-rw-r--r--drivers/net/can/mscan/mscan.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c
index 500d18918bd..40827c128b6 100644
--- a/drivers/net/can/mscan/mscan.c
+++ b/drivers/net/can/mscan/mscan.c
@@ -204,11 +204,8 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
int i, rtr, buf_id;
u32 can_id;
- if (skb->len != sizeof(*frame) || frame->can_dlc > 8) {
- kfree_skb(skb);
- dev->stats.tx_dropped++;
+ if (can_dropped_invalid_skb(dev, skb))
return NETDEV_TX_OK;
- }
out_8(&regs->cantier, 0);