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>
This commit is contained in:
Tudor Ambarus 2019-11-02 11:23:44 +00:00
parent 40b7d5cccc
commit b24eaf5f23
No known key found for this signature in database
GPG Key ID: 4B554F47A58D14E9

View File

@ -974,7 +974,12 @@ static int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 status_new)
if (ret)
return ret;
return (nor->bouncebuf[0] != status_new) ? -EIO : 0;
if (nor->bouncebuf[0] != status_new) {
dev_dbg(nor->dev, "SR: read back test failed\n");
return -EIO;
}
return 0;
}
/**