From: Takahiro Kuwano Date: Mon, 25 Jul 2022 09:25:02 +0000 (+0300) Subject: mtd: spi-nor: core: Return error code from set_4byte_addr_mode() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=08412e72afba3a2daef3e7f3378c3753255a0017;p=linux.git 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 Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20220725092505.446315-5-tudor.ambarus@microchip.com --- diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 9f07f10361512..ec4c368b4ba60 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;