aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/devices/mtd_dataflash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices/mtd_dataflash.c')
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 99d3a0320fc..155737e7483 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -508,7 +508,7 @@ add_dataflash(struct spi_device *spi, char *name,
priv->partitioned = 1;
return add_mtd_partitions(device, parts, nr_parts);
}
- } else if (pdata->nr_parts)
+ } else if (pdata && pdata->nr_parts)
dev_warn(&spi->dev, "ignoring %d default partitions on %s\n",
pdata->nr_parts, device->name);