diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2020-04-21 06:31:31 +0000 |
---|---|---|
committer | Tudor Ambarus <tudor.ambarus@microchip.com> | 2020-04-29 09:03:20 +0300 |
commit | 8aadd77cd27172988414408f43bb9e5bef01b14d (patch) | |
tree | bac5a2155b4bb11dc8127e0c9d280c18f2b5c09e | |
parent | f80ff13135cb44a9be96f695d19212ae952ee5f4 (diff) | |
download | linux-stable-8aadd77cd27172988414408f43bb9e5bef01b14d.tar.gz linux-stable-8aadd77cd27172988414408f43bb9e5bef01b14d.tar.bz2 linux-stable-8aadd77cd27172988414408f43bb9e5bef01b14d.zip |
mtd: spi-nor: Uniformize the return value in spi_nor_*_ready()
spi_nor_ready() returns 1 if ready, 0 if not ready and -errno on errors.
Do the same in all the spi_nor_*_ready() children.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
-rw-r--r-- | drivers/mtd/spi-nor/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 757ac0e21554..2fede0667759 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -640,7 +640,7 @@ static int spi_nor_fsr_ready(struct spi_nor *nor) return -EIO; } - return nor->bouncebuf[0] & FSR_READY; + return !!(nor->bouncebuf[0] & FSR_READY); } /** |