diff options
author | Liam Beguin <liambeguin@gmail.com> | 2018-03-15 02:15:10 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-03-22 20:25:20 +0300 |
commit | aa1ced7f09798700f3d96f39f6f5dc7d3d34cf66 (patch) | |
tree | b560e8d0ca320eb3b1938b6fdbd39c3deae89ee0 /drivers/mtd | |
parent | 5473eb6d153929f67b45ec0f7f664ac7f98c494c (diff) | |
download | u-boot-aa1ced7f09798700f3d96f39f6f5dc7d3d34cf66.tar.xz |
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi/spi_flash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 294d9f9d79..2e61685d3e 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -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; } |