aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/lpddr/lpddr2_nvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/lpddr/lpddr2_nvm.c')
-rw-r--r--drivers/mtd/lpddr/lpddr2_nvm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/lpddr/lpddr2_nvm.c b/drivers/mtd/lpddr/lpddr2_nvm.c
index 72f5c7b30079..add4386f99f0 100644
--- a/drivers/mtd/lpddr/lpddr2_nvm.c
+++ b/drivers/mtd/lpddr/lpddr2_nvm.c
@@ -433,6 +433,8 @@ static int lpddr2_nvm_probe(struct platform_device *pdev)
/* lpddr2_nvm address range */
add_range = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!add_range)
+ return -ENODEV;
/* Populate map_info data structure */
*map = (struct map_info) {