summaryrefslogtreecommitdiff
path: root/drivers/mtd/maps/physmap-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/physmap-core.c')
-rw-r--r--drivers/mtd/maps/physmap-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/maps/physmap-core.c b/drivers/mtd/maps/physmap-core.c
index 85eca6a192e6..c73854da5136 100644
--- a/drivers/mtd/maps/physmap-core.c
+++ b/drivers/mtd/maps/physmap-core.c
@@ -300,6 +300,9 @@ static const char *of_select_probe_type(struct platform_device *dev)
const char *probe_type;
match = of_match_device(of_flash_match, &dev->dev);
+ if (!match)
+ return NULL;
+
probe_type = match->data;
if (probe_type)
return probe_type;