From ebff038e8410271224c0b50e7092e0786b9056a5 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 10 Jun 2015 22:31:28 -0500 Subject: google/panther: fix MAC address programming when VPD not present Commit 899d13d (cbfs: new API and better program loading) broke panther's lan init when no vpd.bin present from which to read the MAC address. Fix this by checking the validity of the search address pointer, rather than the search length. Change-Id: I8c7ca410d8ce5c5d92242a21c4c2ff4c001a68bd Signed-off-by: Matt DeVillier Reviewed-on: http://review.coreboot.org/10509 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel --- src/mainboard/google/panther/lan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainboard/google/panther/lan.c b/src/mainboard/google/panther/lan.c index 4b34c0678c..5d806dbb05 100644 --- a/src/mainboard/google/panther/lan.c +++ b/src/mainboard/google/panther/lan.c @@ -132,7 +132,7 @@ static void program_mac_address(u16 io_base) &search_length); } - if (search_length <= 0) + if (search_address == NULL) printk(BIOS_ERR, "LAN: VPD not found.\n"); else get_mac_address(&high_dword, &low_dword, search_address, -- cgit v1.2.3