[U-Boot,1/2] mtd: spi-nor-core: Use dev_err for reporting erase/write failures
diff mbox series

Message ID 20190926133427.17635-2-vigneshr@ti.com
State Accepted
Commit cc9118757f6ce57bf1776cca41cb52a3dc24401e
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series
  • spi-nor-core: Fix small sector erase with SFDP
Related show

Commit Message

Vignesh Raghavendra Sept. 26, 2019, 1:34 p.m. UTC
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>
---
 drivers/mtd/spi/spi-nor-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index 1acff745d1a2..22915c23edff 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -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);