mtd: spi-nor-core: Use dev_err for reporting erase/write failures
authorVignesh Raghavendra <vigneshr@ti.com>
Thu, 26 Sep 2019 13:34:26 +0000 (19:04 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 24 Oct 2019 19:18:32 +0000 (00:48 +0530)
Use dev_err() when reporting reason for erase/write failures so that
users can be made aware of the reason for failure.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/spi/spi-nor-core.c

index 990e39d7c2f6f50c72cfb99619ef83c3160cc391..1eebbcb9194d0f73c897790b3610c520c1b7136e 100644 (file)
@@ -380,12 +380,12 @@ static int spi_nor_fsr_ready(struct spi_nor *nor)
 
        if (fsr & (FSR_E_ERR | FSR_P_ERR)) {
                if (fsr & FSR_E_ERR)
-                       dev_dbg(nor->dev, "Erase operation failed.\n");
+                       dev_err(nor->dev, "Erase operation failed.\n");
                else
-                       dev_dbg(nor->dev, "Program operation failed.\n");
+                       dev_err(nor->dev, "Program operation failed.\n");
 
                if (fsr & FSR_PT_ERR)
-                       dev_dbg(nor->dev,
+                       dev_err(nor->dev,
                                "Attempted to modify a protected sector.\n");
 
                nor->write_reg(nor, SPINOR_OP_CLFSR, NULL, 0);