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 <matt.devillier@gmail.com>
Reviewed-on: http://review.coreboot.org/10509
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Matt DeVillier 2015-06-10 22:31:28 -05:00 committed by Stefan Reinauer
parent dee4420318
commit ebff038e84
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);
}
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,