From: Kurt Van Dijck Date: Tue, 27 Oct 2009 00:33:59 +0000 (-0700) Subject: can: sja1000: fix bug using library functions for skb allocation X-Git-Tag: MMI-PSA29.97-13-9~25754^2~703 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9dbb58d867e90d2528752339751216c955523e62;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git can: sja1000: fix bug using library functions for skb allocation Commit 7b6856a0 "can: provide library functions for skb allocation" did not properly remove two lines of the SJA1000 driver resulting in a 'skb_over_panic' when calling skb_put, as reported by Kurt. Signed-off-by: Kurt Van Dijck Signed-off-by: Wolfgang Grandegger Signed-off-by: David S. Miller --- diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 1a9c5958bbd7..782a47fabf2c 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c @@ -321,8 +321,6 @@ static void sja1000_rx(struct net_device *dev) if (fi & FI_RTR) id |= CAN_RTR_FLAG; - cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame)); - memset(cf, 0, sizeof(struct can_frame)); cf->can_id = id; cf->can_dlc = dlc; for (i = 0; i < dlc; i++)