[coreboot] [PATCH] Remove scanbuild warning in hypertransport.c

Myles Watson mylesgw at gmail.com
Tue May 26 17:25:49 CEST 2009


Scanbuild finds a possible null pointer dereference here:

http://www.coreboot.org/~stepan/coreboot-scanbuild/kontron_986lcd-m-scanbuild/report-ehErvY.html#EndPath

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 at gmail.com>

Thanks,
Myles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ht_null.diff
Type: text/x-patch
Size: 1875 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090526/48adb2d1/attachment.diff>


More information about the coreboot mailing list