summaryrefslogtreecommitdiff
path: root/src/mainboard/sunw/ultra40m2
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-07-30 13:10:44 +0200
committerMartin Roth <martinroth@google.com>2016-07-31 19:25:04 +0200
commit2660a1321aad07efe14b739e15c39e5c0c886a85 (patch)
treebc3a7157240380e92d99e6a0f9881dc634c1538a /src/mainboard/sunw/ultra40m2
parent1fcebe7fd952d8ea50d421bbc0bd02f23cbf760b (diff)
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 Reviewed-on: https://review.coreboot.org/15982 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/mainboard/sunw/ultra40m2')
-rw-r--r--src/mainboard/sunw/ultra40m2/mainboard.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mainboard/sunw/ultra40m2/mainboard.c b/src/mainboard/sunw/ultra40m2/mainboard.c
index 3e2bbf004a..072e8a1b79 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));