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>
This commit is contained in:
Tudor Ambarus 2020-04-21 06:31:31 +00:00
parent f80ff13135
commit 8aadd77cd2
No known key found for this signature in database
GPG Key ID: 4B554F47A58D14E9

View File

@ -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);
}
/**