Skip to content

Commit b24eaf5

Browse files
committed
mtd: spi-nor: Print debug message when the read back test fails
Demystify where the EIO error occurs. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
1 parent 40b7d5c commit b24eaf5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/mtd/spi-nor/spi-nor.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,12 @@ static int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 status_new)
974974
if (ret)
975975
return ret;
976976

977-
return (nor->bouncebuf[0] != status_new) ? -EIO : 0;
977+
if (nor->bouncebuf[0] != status_new) {
978+
dev_dbg(nor->dev, "SR: read back test failed\n");
979+
return -EIO;
980+
}
981+
982+
return 0;
978983
}
979984

980985
/**

0 commit comments

Comments
 (0)