summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi-nor/sfdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/spi-nor/sfdp.c')
-rw-r--r--drivers/mtd/spi-nor/sfdp.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c
index 69e47c9778a2..e184b67f3c9f 100644
--- a/drivers/mtd/spi-nor/sfdp.c
+++ b/drivers/mtd/spi-nor/sfdp.c
@@ -1260,14 +1260,21 @@ out:
* Used to tweak various flash parameters when information provided by the SFDP
* tables are wrong.
*/
-static void spi_nor_post_sfdp_fixups(struct spi_nor *nor)
+static int spi_nor_post_sfdp_fixups(struct spi_nor *nor)
{
+ int ret;
+
if (nor->manufacturer && nor->manufacturer->fixups &&
- nor->manufacturer->fixups->post_sfdp)
- nor->manufacturer->fixups->post_sfdp(nor);
+ nor->manufacturer->fixups->post_sfdp) {
+ ret = nor->manufacturer->fixups->post_sfdp(nor);
+ if (ret)
+ return ret;
+ }
if (nor->info->fixups && nor->info->fixups->post_sfdp)
- nor->info->fixups->post_sfdp(nor);
+ return nor->info->fixups->post_sfdp(nor);
+
+ return 0;
}
/**
@@ -1477,7 +1484,7 @@ int spi_nor_parse_sfdp(struct spi_nor *nor)
}
}
- spi_nor_post_sfdp_fixups(nor);
+ err = spi_nor_post_sfdp_fixups(nor);
exit:
kfree(param_headers);
return err;