[coreboot-gerrit] New patch to review for coreboot: google/jecht: fix MAC address programming when VPD not present

Matt DeVillier (matt.devillier@gmail.com) gerrit at coreboot.org
Thu Jun 11 19:57:50 CEST 2015


Matt DeVillier (matt.devillier at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10516

-gerrit

commit 508d3482d643058c7a47a5f51192669ec9e942e9
Author: Matt DeVillier <matt.devillier at gmail.com>
Date:   Thu Jun 11 12:54:34 2015 -0500

    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 at gmail.com>
---
 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 963322e..8abbe1d 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,



More information about the coreboot-gerrit mailing list