
10 Nov
2009
10 Nov
'09
7:53 a.m.
javier Martin wrote:
Sometimes, inside NetLoop, eth_halt() is called before eth_init() has been called. This is harmless except for free() calls to pointers which have not been allocated yet.
This patch initializes those pointers to NULL and allocates them only the first time. This way we can get rid of free calls in halt callback.
This has been tested in i.MX27 Litekit board and eldk-4.2 toolchains.
Signed-off-by: Javier Martin javier.martin@vista-silicon.com
drivers/net/fec_mxc.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
Applied to net repo.
thanks, Ben