Skip to content

Commit

Permalink
mtd: spi-nor: core: Return error code from set_4byte_addr_mode()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Takahiro Kuwano authored and Tudor Ambarus committed Jul 28, 2022
1 parent 47c6f8a commit 08412e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/spi-nor/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 08412e7

Please sign in to comment.