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 <matt.devillier@gmail.com>
Reviewed-on: http://review.coreboot.org/10516
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Matt DeVillier 2015-06-11 12:54:34 -05:00 committed by Patrick Georgi
parent c866591698
commit 07f8d8e63f
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ static void program_mac_address(u16 io_base)
&search_length); &search_length);
} }
if (search_length <= 0) if (search_address == NULL)
printk(BIOS_ERR, "LAN: VPD not found.\n"); printk(BIOS_ERR, "LAN: VPD not found.\n");
else else
get_mac_address(&high_dword, &low_dword, search_address, get_mac_address(&high_dword, &low_dword, search_address,