mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
spi: spi_flash: do not fail silently on bad user input
Make sure the user is notified instead of silently returning an error. Signed-off-by: Liam Beguin <liambeguin@gmail.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
5473eb6d15
commit
aa1ced7f09
1 changed files with 1 additions and 1 deletions
|
@ -320,7 +320,7 @@ int spi_flash_cmd_erase_ops(struct spi_flash *flash, u32 offset, size_t len)
|
|||
|
||||
erase_size = flash->erase_size;
|
||||
if (offset % erase_size || len % erase_size) {
|
||||
debug("SF: Erase offset/length not multiple of erase size\n");
|
||||
printf("SF: Erase offset/length not multiple of erase size\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue