Skip to content

Commit 08412e7

Browse files
Kuwano-sanambarus
authored andcommitted
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
1 parent 47c6f8a commit 08412e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/spi-nor/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2724,7 +2724,7 @@ static int spi_nor_init(struct spi_nor *nor)
27242724
*/
27252725
WARN_ONCE(nor->flags & SNOR_F_BROKEN_RESET,
27262726
"enabling reset hack; may not recover from unexpected reboots\n");
2727-
nor->params->set_4byte_addr_mode(nor, true);
2727+
return nor->params->set_4byte_addr_mode(nor, true);
27282728
}
27292729

27302730
return 0;

0 commit comments

Comments
 (0)