From: Tom Rini Date: Mon, 23 Sep 2013 15:17:57 -0400 Subject: [U-Boot] [PATCH] Prevent a U-Boot crash on Wandboard In-Reply-To: <20130923185055.95383380635@gemini.denx.de> References: <523F979C.1070205@gmail.com> <20130923181158.0c1747f5@lilith> <20130923185055.95383380635@gemini.denx.de> Message-ID: <20130923191757.GZ5273@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Sep 23, 2013 at 08:50:55PM +0200, Wolfgang Denk wrote: > Dear Fabio Estevam, > > In message you wrote: > > > > > Then shouldn't the patch subject/summary be "print command name only > > > if cmdtp is not NULL" rather than the quite uninformative "prevent a > > > crash"? > > > > Yes, I agree that original subject is a bit misleading. > > > > When I read it I thought it was a Wandboard related problem. > > I don't know if it's only Wandboard, or if other boards are affected, > too (which are these? under which exact test cases?). In any case. > the problem is not here, but on the caller's side. It should not call > a function which expects a command name with a NULL pointer passed as > argument. I looked around at this a bit this morning. cmd_pxe.c would need a lot of mangling to pass around cmdtp, just for the sake of an error message that's then ignored as the caller logic is: 1) Try bootm on the image 2) If CONFIG_CMD_BOOTZ, if bootm returned, maybe we got a zImage? do_bootz instead (also NULL cmdtp). The error message wouldn't exactly make sense here either, being invoked via menu. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: