mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 23:07:00 +00:00
mtd: spi-nor-core: Check return value of write_disable() in spi_nor_erase()
The cleanup code of spi_nor_erase() function calls write_disable(), but does not return it's return value even in case of failure. Fix this. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
This commit is contained in:
parent
a9d9d412e0
commit
f57277997b
1 changed files with 3 additions and 1 deletions
|
@ -953,7 +953,9 @@ erase_err:
|
|||
if (!ret)
|
||||
ret = err;
|
||||
#endif
|
||||
write_disable(nor);
|
||||
err = write_disable(nor);
|
||||
if (!ret)
|
||||
ret = err;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue