Skip to content

Commit

Permalink
mtd: spi-nor: Uniformize the return value in spi_nor_*_ready()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tudor Ambarus committed Apr 29, 2020
1 parent f80ff13 commit 8aadd77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/spi-nor/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 8aadd77

Please sign in to comment.