mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
mtd: spi-nor: Fix errno on Quad Enable methods
When the Read-Modify-Write-Read-Back Quad Enable methods failed on the Read-Back, they returned -EINVAL. Since this is an I/O error, return -EIO. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
This commit is contained in:
parent
6011b484f1
commit
b0db77f5aa
1 changed files with 3 additions and 3 deletions
|
@ -1964,7 +1964,7 @@ static int macronix_quad_enable(struct spi_nor *nor)
|
|||
|
||||
if (!(nor->bouncebuf[0] & SR_QUAD_EN_MX)) {
|
||||
dev_dbg(nor->dev, "Macronix Quad bit not set\n");
|
||||
return -EINVAL;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -2042,7 +2042,7 @@ static int spansion_read_cr_quad_enable(struct spi_nor *nor)
|
|||
|
||||
if (!(sr_cr[1] & CR_QUAD_EN_SPAN)) {
|
||||
dev_dbg(nor->dev, "Spansion Quad bit not set\n");
|
||||
return -EINVAL;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -2086,7 +2086,7 @@ static int sr2_bit7_quad_enable(struct spi_nor *nor)
|
|||
|
||||
if (!(*sr2 & SR2_QUAD_EN_BIT7)) {
|
||||
dev_dbg(nor->dev, "SR2 Quad bit not set\n");
|
||||
return -EINVAL;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue