Javier,

On Mon, Oct 19, 2009 at 10:48 PM, javier Martin <
javier.mar...@vista-silicon.com> 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 adds two states to
> distinguish when it is necessary to call free() and when it is not.
>
> IMHO we should aim to make this driver less complicated, not more.  Do we
really need to malloc and free each time this interface is turned on or off?
 Why not just initialize the pointers to NULL, and malloc() only the first
time the init() function is called?  You could then get rid of the free()
calls in the halt function.

U-boot is very transient in nature.  Once we launch a kernel all the memory
essentially gets freed anyway.

regards,
Ben
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to