Skip to content
Commit ee0b0be2 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Jagan Teki
Browse files

cmd: fix return code of 'sf erase'



If the offset or the size passed to the 'sf erase' command exceeds
the size of the SPI flash displaying the command usage is not
helpful. Return CMD_RET_FAILURE instead of CMD_RET_USAGE.

Use the CMD_RET_* constants instead of 0, 1, -1.

Simplify a logical expression in the final return statement.

Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: default avatarDhruva Gole <d-gole@ti.com>
Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
parent 8c8df676
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment