From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liam Beguin Date: Tue, 13 Mar 2018 22:03:01 -0400 Subject: [U-Boot] [PATCH v3 1/7] spi: spi_flash: do not fail silently on bad user input In-Reply-To: <20180314020307.23475-1-liambeguin@gmail.com> References: <20180314020307.23475-1-liambeguin@gmail.com> Message-ID: <20180314020307.23475-2-liambeguin@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Make sure the user is notified instead of silently returning an error. Signed-off-by: Liam Beguin --- drivers/mtd/spi/spi_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 294d9f9d79c6..2e61685d3ea4 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; } -- 2.16.1.72.g5be1f00a9a70