Scanbuild finds a possible null pointer dereference here:
http://www.coreboot.org/~stepan/coreboot-scanbuild/kontron_986lcd-m-scanbuil...
There are two ways that I thought of fixing it.
The first way is just to insert an
if (first == NULL) return NULL;
at line 53 and remove the if (first) condition.
The only problem with that is that it makes the change look bigger than it is.
Here's a simpler looking change. Either one is fine with me. Boot tested on s2892.
Signed-off-by: Myles Watson mylesgw@gmail.com
Thanks, Myles