mb/google/octopus: Add null pointer check
src/mainboard/google/octopus/mainboard.c Function dev_find_slot may return NULL, check before its usage. Found-by: klockwork BRANCH=None TEST=Built & booted Yorp board. Change-Id: I160adbe3b0a5a2b0f11fd1567513860664d4bee3 Signed-off-by: John Zhao <john.zhao@intel.com> Reviewed-on: https://review.coreboot.org/28235 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
c5ee35ff86
commit
a2c0cf5dfe
|
@ -169,6 +169,7 @@ static void wifi_device_update(void)
|
|||
devfn = PCH_DEVFN_PCIE1;
|
||||
|
||||
dev = dev_find_slot(0, devfn);
|
||||
if (dev)
|
||||
dev->enabled = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue