Commit e93e809f authored by Nikita Kiryanov's avatar Nikita Kiryanov Committed by Stefano Babic

compulab: eeprom: propagate error value in read_mac_addr()

cl_eeprom_read_mac_addr() doesn't differentiate between success case and
inability to access eeprom. Fix this by propagating the return value of

Cc: Stefano Babic <>
Cc: Igor Grinberg <>
Signed-off-by: default avatarNikita Kiryanov <>
Acked-by: default avatarIgor Grinberg <>
parent 72898ac7
......@@ -105,9 +105,11 @@ void get_board_serial(struct tag_serialnr *serialnr)
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
uint offset;
int err;
if (cl_eeprom_setup(eeprom_bus))
return 0;
err = cl_eeprom_setup(eeprom_bus);
if (err)
return err;
offset = (cl_eeprom_layout != LAYOUT_LEGACY) ?
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment