mtd: m25p80: handle failed spi_write in m25p80_erase
PATCH 2/3 mtd: m25p80: handle failed spi_write in m25p80_erase
Handle the case that spi_write fails.
Signed-off-by Heiner Kallweit <[email protected]>
--- drivers/mtd/devices/m25p80.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mtd/devices/m25p80.c +1 -3
@@ -171,9 +171,7 @@ static int m25p80_erase(struct spi_nor *nor, loff_t offset) flash->command[0 ] = nor->erase_opcode;m25p_addr2cmd (nor, offset, flash->command); -spi_write (flash->spi, flash->command,m25p_cmdsz (nor)); - -return 0 ; +return spi_write (flash->spi, flash->command,m25p_cmdsz (nor)); }/*
Signature · 1 line
2.6.2