From: Liam Beguin Date: Wed, 14 Mar 2018 23:15:10 +0000 (-0400) Subject: spi: spi_flash: do not fail silently on bad user input X-Git-Tag: v2018.05-rc1~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aa1ced7f09798700f3d96f39f6f5dc7d3d34cf66;p=u-boot 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 Reviewed-by: Stephen Warren --- 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; }