mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: 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. BUG=None BRANCH=None TEST=None Change-Id: Id5d321c712af70c374307643ced5c995431d324f 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: Kysti Mlkki <kyosti.malkki@gmail.com> Reviewed-on: https://chromium-review.googlesource.com/366283 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
parent
d34f50ed67
commit
b2677a7884
1 changed files with 3 additions and 1 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue