Commit b24eaf5f authored by Tudor Ambarus's avatar Tudor Ambarus

mtd: spi-nor: Print debug message when the read back test fails

Demystify where the EIO error occurs.
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: default avatarVignesh Raghavendra <vigneshr@ti.com>
parent 40b7d5cc
......@@ -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;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment