summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-09-07 14:00:17 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-09-13 13:54:39 +0000
commit8b98f8bf076dbbd5bf5431ec41c06c3942880a24 (patch)
tree4b90d17924fa86d61d6e5876bfadbe2823f19ca6 /src
parent6a73b2466f388b34086a941572d0af7d0614da3f (diff)
downloadcoreboot-8b98f8bf076dbbd5bf5431ec41c06c3942880a24.tar.gz
coreboot-8b98f8bf076dbbd5bf5431ec41c06c3942880a24.tar.bz2
coreboot-8b98f8bf076dbbd5bf5431ec41c06c3942880a24.zip
SMBIOS: Skip `get_smbios_data` for disabled devices
If a device is disabled, do not call the `get_smbios_data` code. Change-Id: I8960f869e0864f7c82d5fe507f96b62cbd045569 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57458 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/smbios.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 967883a61ea1..e9c8f47a446e 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -1229,7 +1229,10 @@ static int smbios_walk_device_tree(struct device *tree, int *handle, unsigned lo
int len = 0;
for (dev = tree; dev; dev = dev->next) {
- if (dev->enabled && dev->ops && dev->ops->get_smbios_data) {
+ if (!dev->enabled)
+ continue;
+
+ if (dev->ops && dev->ops->get_smbios_data) {
printk(BIOS_INFO, "%s (%s)\n", dev_path(dev), dev_name(dev));
len += dev->ops->get_smbios_data(dev, handle, current);
} else {