[flashrom] [PATCH] CID1130002: Logically dead code

Stefan Reinauer stefan.reinauer at coreboot.org
Tue Nov 19 20:35:57 CET 2013


CID1130002: Logically dead code

The indicated dead code may have performed some action; that action will never
occur.
In satamv_init: Code can never be reached because of a logical contradiction

What we really want to do is check whether PCI_BASE_ADDRESS_2 is valid at this
point, and not PCI_BASE_ADDRESS_0.

Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>

Index: satamv.c
===================================================================
--- satamv.c	(revision 1763)
+++ satamv.c	(working copy)
@@ -139,7 +139,7 @@
 
 	/* Get I/O BAR location. */
 	tmp = pcidev_readbar(dev, PCI_BASE_ADDRESS_2);
-	if (!addr)
+	if (!tmp)
 		return 1;
 
 	/* Truncate to reachable range.




More information about the flashrom mailing list