From 07f8d8e63fd0bcbafcc3eafac0e49ce632aa34b7 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Thu, 11 Jun 2015 12:54:34 -0500 Subject: [PATCH] google/jecht: fix MAC address programming when VPD not present Fix by checking the actual function return value (the search address pointer), rather than the search length value (which isn't guaranteed to be sane or useful). Change-Id: I226c635ddbbc916b02494fcd97df27d141cc2c7f Signed-off-by: Matt DeVillier Reviewed-on: http://review.coreboot.org/10516 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/mainboard/google/jecht/lan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainboard/google/jecht/lan.c b/src/mainboard/google/jecht/lan.c index 963322e6bd..8abbe1d1be 100644 --- a/src/mainboard/google/jecht/lan.c +++ b/src/mainboard/google/jecht/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,