can: at91_can: fix use after free of priv
authorMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 21 Oct 2010 01:01:15 +0000 (01:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Oct 2010 21:47:48 +0000 (14:47 -0700)
The priv is part of the memory allocated by alloc_candev().
This patch moved the free it after last usage of priv.

While there convert all free_netdev() to free_candev() (which is currently
just a wrapper around free_netdev()) to be symetrically with the allocation
via alloc_candev().

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found