* [patch] mtd/sst25l: check for null consistently
@ 2010-05-22 20:16 Dan Carpenter
2010-06-12 14:21 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-22 20:16 UTC (permalink / raw)
To: David Woodhouse
Cc: Artem Bityutskiy, kernel-janitors, H Hartley Sweeten,
Andre Renaud, linux-mtd, Andrew Morton
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>
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index ab5d8cd..684247a 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)
parts, nr_parts);
}
- } else if (data->nr_parts) {
+ } else if (data && data->nr_parts) {
dev_warn(&spi->dev, "ignoring %d default partitions on %s\n",
data->nr_parts, data->name);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] mtd/sst25l: check for null consistently
2010-05-22 20:16 [patch] mtd/sst25l: check for null consistently Dan Carpenter
@ 2010-06-12 14:21 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-06-12 14:21 UTC (permalink / raw)
To: Dan Carpenter
Cc: kernel-janitors, H Hartley Sweeten, Andre Renaud, linux-mtd,
Andrew Morton, David Woodhouse
On Sat, 2010-05-22 at 22:16 +0200, Dan Carpenter wrote:
> 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>
Pushed to l2-mtd-2.6.git, Thanks.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-12 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 20:16 [patch] mtd/sst25l: check for null consistently Dan Carpenter
2010-06-12 14:21 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).