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 294d9f9..2e61685 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;
        }