[PATCH v16 4/8] mtd: spi-nor: core: Return error code from set_4byte_addr_mode()
tkuw584924 at gmail.com
tkuw584924 at gmail.com
Thu Jun 9 01:57:41 PDT 2022
From: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
The prams->set_4byte_addr_mode returns error code but is not handled
in spi_nor_init().
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
---
drivers/mtd/spi-nor/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 70a9570fc2d4..3aa159d29159 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -2729,7 +2729,7 @@ static int spi_nor_init(struct spi_nor *nor)
*/
WARN_ONCE(nor->flags & SNOR_F_BROKEN_RESET,
"enabling reset hack; may not recover from unexpected reboots\n");
- nor->params->set_4byte_addr_mode(nor, true);
+ return nor->params->set_4byte_addr_mode(nor, true);
}
return 0;
--
2.25.1
More information about the linux-mtd
mailing list