Skip to content
Commit 04add62e authored by Ralph Siemsen's avatar Ralph Siemsen Committed by Tom Rini
Browse files

env: sf: report malloc error to caller



In the non-redundant code for env_sf_save(), a failure to malloc() the
temporary buffer produces the following output:

    Saving Environment to SPIFlash... OK

This is misleading as the flash has neither been erased nor written.

Fix it to return an error to the caller, so the output will be:

    Saving Environment to SPIFlash... Failed (-12)

Note that there is another copy of env_sf_save() in the same file, for
handling redundant environment, and it already has the same logic.

Signed-off-by: default avatarRalph Siemsen <ralph.siemsen@linaro.org>
parent ca6d60df
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