starfive: fix return code of `mac write_eeprom`
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 9 Aug 2025 08:21:55 +0000 (10:21 +0200)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 14 Aug 2025 07:33:00 +0000 (15:33 +0800)
commit909ceacf4a8ac5360c25588f9db7b6dbd19c5c06
tree44050901f1cf95ea02be5ba3fcfedd9afdde10eb
parent3856d93ea331f462a9bebf072390a66d104a1a93
starfive: fix return code of `mac write_eeprom`

When writing the EEPROM fails, the command usage help text is displayed
after the error message. We should only display the error message instead.

If writing the EEPROM fails, return CMD_RET_FAILURE (1) instead of
CMD_RET_USAGE (-1).

Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: E Shattow <e@freeshell.de>
board/starfive/visionfive2/visionfive2-i2c-eeprom.c