summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>2022-07-25 11:25:02 +0200
committerTudor Ambarus <tudor.ambarus@microchip.com>2022-07-28 04:11:56 +0200
commit08412e72afba3a2daef3e7f3378c3753255a0017 (patch)
tree1b68d7dbb4c120813fcd07bfc96e641646cb7493 /drivers/mtd
parentmtd: spi-nor: Do not change nor->addr_nbytes at SFDP parsing time (diff)
downloadlinux-08412e72afba3a2daef3e7f3378c3753255a0017.tar.xz
linux-08412e72afba3a2daef3e7f3378c3753255a0017.zip
mtd: spi-nor: core: Return error code from set_4byte_addr_mode()
The prams->set_4byte_addr_mode returns error code but is not handled in spi_nor_init(). Handle the return code from set_4byte_addr_mode(). Suggested-by: Michael Walle <michael@walle.cc> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Michael Walle <michael@walle.cc> Link: https://lore.kernel.org/r/20220725092505.446315-5-tudor.ambarus@microchip.com
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi-nor/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 9f07f1036151..ec4c368b4ba6 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -2724,7 +2724,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;