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 <kurt.van.dijck@eia.be>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Kurt Van Dijck 2009-10-26 17:33:59 -07:00 committed by David S. Miller
parent 10e85f7f08
commit 9dbb58d867

View File

@ -321,8 +321,6 @@ static void sja1000_rx(struct net_device *dev)
if (fi & FI_RTR) if (fi & FI_RTR)
id |= CAN_RTR_FLAG; 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_id = id;
cf->can_dlc = dlc; cf->can_dlc = dlc;
for (i = 0; i < dlc; i++) for (i = 0; i < dlc; i++)