Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15982
-gerrit
commit 862303606dd9aa751eeb177b8422fc0a603c2284 Author: Patrick Georgi pgeorgi@chromium.org Date: Sat Jul 30 13:10:44 2016 +0200
sunw/ultra40m2: Fix handling non-existence of a device
This probably never happens, but since we already test for the presence of the device, it makes no sense to try to configure it after its absense was determined.
Change-Id: I9877dcd15819fb7949fa08a0954b05780df66316 Signed-off-by: Patrick Georgi pgeorgi@chromium.org Found-by: Coverity Scan #1347362 --- src/mainboard/sunw/ultra40m2/mainboard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/sunw/ultra40m2/mainboard.c b/src/mainboard/sunw/ultra40m2/mainboard.c index 3e2bbf0..072e8a1 100644 --- a/src/mainboard/sunw/ultra40m2/mainboard.c +++ b/src/mainboard/sunw/ultra40m2/mainboard.c @@ -52,8 +52,10 @@ static void emc6d103_init(void) };
struct device * const dev = dev_find_slot_on_smbus(2, 0x2d); - if (dev == NULL) + if (dev == NULL) { printk(BIOS_WARNING, "EMC6D103 not found\n"); + return; + }
printk(BIOS_SPEW, "%s EMC6D103 id: %x %x\n", __func__, smbus_read_byte(dev, 0x3e), smbus_read_byte(dev, 0x3f));