nb/intel/i945: Fix SPD dumps

Currently the `break` further down is called unconditionally as the
brackets for the body of the if statement are missing. Add those.

Change-Id: I34917a9877dcc882d880dedea689e1d72fe52888
Found-by: Coverity (CID 1372941:  Control flow issues  (UNREACHABLE))
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/18971
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Paul Menzel 2017-03-24 16:17:16 +01:00 committed by Patrick Georgi
parent c790850ebe
commit b45bbb253f
1 changed files with 2 additions and 1 deletions

View File

@ -87,9 +87,10 @@ void dump_spd_registers(void)
if ((i % 16) == 0)
printk(BIOS_DEBUG, "\n%02x: ", i);
status = smbus_read_byte(device, i);
if (status < 0)
if (status < 0) {
printk(BIOS_DEBUG, "bad device: %02x\n", -status);
break;
}
printk(BIOS_DEBUG, "%02x ", status);
}
device++;