]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: spi_flash: do not fail silently on bad user input
authorLiam Beguin <liambeguin@gmail.com>
Wed, 14 Mar 2018 23:15:10 +0000 (19:15 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 22 Mar 2018 17:25:20 +0000 (13:25 -0400)
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>
drivers/mtd/spi/spi_flash.c

index 294d9f9d79c6eb123dec396bd56fac801d8da860..2e61685d3ea462509c40c431c8dd6129ca48a6bc 100644 (file)
@@ -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;
        }