summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2015-06-11 12:54:34 -0500
committerPatrick Georgi <pgeorgi@google.com>2015-06-12 10:55:07 +0200
commit07f8d8e63fd0bcbafcc3eafac0e49ce632aa34b7 (patch)
tree688a4e13382ea77a46347c4b7cabc13470bb7465 /src
parentc8665916987e980d3b49b16e99365557068fa64f (diff)
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)
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/jecht/lan.c2
1 files changed, 1 insertions, 1 deletions
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,