From: Tudor Ambarus Date: Tue, 21 Apr 2020 06:31:31 +0000 (+0000) Subject: mtd: spi-nor: Uniformize the return value in spi_nor_*_ready() X-Git-Tag: v5.8-rc1~68^2~4^2~10 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=8aadd77cd27172988414408f43bb9e5bef01b14d;p=linux-block.git 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 Reviewed-by: Vignesh Raghavendra --- 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); } /**