[coreboot-gerrit] Change in coreboot[master]: src/mainboard: Fix issues found by klockwork
John Zhao (Code Review)
gerrit at coreboot.org
Mon Aug 20 19:42:53 CEST 2018
John Zhao has uploaded this change for review. ( https://review.coreboot.org/28235
Change subject: src/mainboard: Fix issues found by klockwork
......................................................................
src/mainboard: Fix issues found by klockwork
src/mainboard/google/octopus/mainboard.c
Function wifi_device_update: Pointer dev returned from
call dev_find_slot may be NULL and will be dereferenced.
BRANCH=None
TEST=Built & booted Yorp board.
Change-Id: I160adbe3b0a5a2b0f11fd1567513860664d4bee3
Signed-off-by: John Zhao <john.zhao at intel.com>
---
M src/mainboard/google/octopus/mainboard.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/28235/1
diff --git a/src/mainboard/google/octopus/mainboard.c b/src/mainboard/google/octopus/mainboard.c
index 61d254e..6effa7c 100644
--- a/src/mainboard/google/octopus/mainboard.c
+++ b/src/mainboard/google/octopus/mainboard.c
@@ -169,7 +169,8 @@
devfn = PCH_DEVFN_PCIE1;
dev = dev_find_slot(0, devfn);
- dev->enabled = 0;
+ if (dev)
+ dev->enabled = 0;
}
void mainboard_devtree_update(struct device *dev)
--
To view, visit https://review.coreboot.org/28235
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I160adbe3b0a5a2b0f11fd1567513860664d4bee3
Gerrit-Change-Number: 28235
Gerrit-PatchSet: 1
Gerrit-Owner: John Zhao <john.zhao at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180820/77938dab/attachment.html>
More information about the coreboot-gerrit
mailing list