Searched hist:"651 ef90fa6ca824c8e581aeef9e04bbbe7f7e9ce" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/drivers/net/ |
| H A D | fec_mxc.c | 651ef90fa6ca824c8e581aeef9e04bbbe7f7e9ce Thu Oct 29 07:22:43 UTC 2009 javier Martin <javier.martin@vista-silicon.com> mxc_fec: avoid free() calls to already freed pointers.
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> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
|