aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-05-22 16:16:26 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-08-02 04:00:45 -0400
commita4b81ca50974051195b11ca173da073b961f94d5 (patch)
treee7385da899666b2b2f0976dc2b76599a33b928af /drivers/mtd/devices
parent00b275dbfc2ae3e3312a910736dd9a6bd5110c2b (diff)
mtd: sst25l: check for null consistently
The rest of the function assumes that "data" can be null. I don't know the code well enough to say whether it can actually be null, but there is no harm in checking here. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/sst25l.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index ab5d8cd02a15..684247a8a5ed 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -454,7 +454,7 @@ static int __init sst25l_probe(struct spi_device *spi)
454 parts, nr_parts); 454 parts, nr_parts);
455 } 455 }
456 456
457 } else if (data->nr_parts) { 457 } else if (data && data->nr_parts) {
458 dev_warn(&spi->dev, "ignoring %d default partitions on %s\n", 458 dev_warn(&spi->dev, "ignoring %d default partitions on %s\n",
459 data->nr_parts, data->name); 459 data->nr_parts, data->name);
460 } 460 }