For 'sf write', 'sf read', 'sf erase' using excessive values of offset or size should not display the command usage but only the error message.
Use CMD_RET_* constants. Simplify do_spi_flash(). Heinrich Schuchardt (3): cmd: fix return code of 'sf write' and 'sf read' cmd: simplify do_spi_flash() cmd: fix return code of 'sf erase' cmd/sf.c | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) -- 2.37.2