[U-Boot] [u-boot] [PATCH] [2/2] [v1.2] mxc_fec: avoid free() calls to already freed pointers.
Wolfgang Denk
wd at denx.de
Sun Oct 25 20:42:11 CET 2009
Dear Ben Warren,
In message <f8328f7c0910251228p4d5bd05j811b32553f37d8ef at mail.gmail.com> you wrote:
>
> > 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.
Full ACK from me. And we don't use that many different Ethernet
drivers in parallel either that the RAM footprint would hurt.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Genitiv ins Wasser, weil's Dativ ist!
More information about the U-Boot
mailing list