From 9c9eb8cbc9deadf2b342236f71d1c9da59a97644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 7 Oct 2012 14:57:15 +0200 Subject: [PATCH] Take care of NULL chip_ops->name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I62b1c497d23ec2241efb963e7834728085824016 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/1565 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/arch/x86/boot/smbios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c index 8877f60ea3..a1717078fb 100644 --- a/src/arch/x86/boot/smbios.c +++ b/src/arch/x86/boot/smbios.c @@ -278,7 +278,8 @@ static int smbios_walk_device_tree(device_t tree, int *handle, unsigned long *cu int len = 0; for(dev = tree; dev; dev = dev->next) { - printk(BIOS_INFO, "%s (%s)\n", dev_path(dev), dev->chip_ops ? dev->chip_ops->name : ""); + printk(BIOS_INFO, "%s (%s)\n", dev_path(dev), + (dev->chip_ops && dev->chip_ops->name) ? dev->chip_ops->name : ""); if (dev->ops && dev->ops->get_smbios_data) len += dev->ops->get_smbios_data(dev, handle, current);