* [patch 1/4] mtd/sst25l: check for null consistently
@ 2010-07-20 22:23 akpm
2010-07-21 10:34 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: akpm @ 2010-07-20 22:23 UTC (permalink / raw)
To: dwmw2; +Cc: Artem.Bityutskiy, akpm, andre, linux-mtd, error27
From: Dan Carpenter <error27@gmail.com>
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>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: Andre Renaud <andre@bluewatersys.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mtd/devices/sst25l.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/mtd/devices/sst25l.c~mtd-sst25l-check-for-null-consistently drivers/mtd/devices/sst25l.c
--- a/drivers/mtd/devices/sst25l.c~mtd-sst25l-check-for-null-consistently
+++ a/drivers/mtd/devices/sst25l.c
@@ -454,7 +454,7 @@ static int __init sst25l_probe(struct sp
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 [flat|nested] 4+ messages in thread
* Re: [patch 1/4] mtd/sst25l: check for null consistently
2010-07-20 22:23 [patch 1/4] mtd/sst25l: check for null consistently akpm
@ 2010-07-21 10:34 ` Artem Bityutskiy
2010-07-21 17:16 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2010-07-21 10:34 UTC (permalink / raw)
To: akpm; +Cc: linux-mtd, andre, dwmw2, error27
On Tue, 2010-07-20 at 15:23 -0700, akpm@linux-foundation.org wrote:
> From: Dan Carpenter <error27@gmail.com>
>
> 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>
> Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Cc: Andre Renaud <andre@bluewatersys.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This patch is also in my l2-mtd-2.6 / master tree.
The tree: http://git.infradead.org/users/dedekind/l2-mtd-2.6.git
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/4] mtd/sst25l: check for null consistently
2010-07-21 10:34 ` Artem Bityutskiy
@ 2010-07-21 17:16 ` Andrew Morton
2010-07-21 18:10 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2010-07-21 17:16 UTC (permalink / raw)
To: Artem.Bityutskiy; +Cc: linux-mtd, andre, dwmw2, error27
On Wed, 21 Jul 2010 13:34:12 +0300 Artem Bityutskiy <Artem.Bityutskiy@nokia.com> wrote:
> On Tue, 2010-07-20 at 15:23 -0700, akpm@linux-foundation.org wrote:
> > From: Dan Carpenter <error27@gmail.com>
> >
> > 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>
> > Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> > Cc: Andre Renaud <andre@bluewatersys.com>
> > Cc: David Woodhouse <dwmw2@infradead.org>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>
> This patch is also in my l2-mtd-2.6 / master tree.
>
> The tree: http://git.infradead.org/users/dedekind/l2-mtd-2.6.git
Can we add that tree to linux-next?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/4] mtd/sst25l: check for null consistently
2010-07-21 17:16 ` Andrew Morton
@ 2010-07-21 18:10 ` Artem Bityutskiy
0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2010-07-21 18:10 UTC (permalink / raw)
To: Andrew Morton; +Cc: Artem.Bityutskiy, andre, linux-mtd, dwmw2, error27
On Wed, 2010-07-21 at 10:16 -0700, Andrew Morton wrote:
> On Wed, 21 Jul 2010 13:34:12 +0300 Artem Bityutskiy <Artem.Bityutskiy@nokia.com> wrote:
>
> > On Tue, 2010-07-20 at 15:23 -0700, akpm@linux-foundation.org wrote:
> > > From: Dan Carpenter <error27@gmail.com>
> > >
> > > 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>
> > > Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> > > Cc: Andre Renaud <andre@bluewatersys.com>
> > > Cc: David Woodhouse <dwmw2@infradead.org>
> > > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> >
> > This patch is also in my l2-mtd-2.6 / master tree.
> >
> > The tree: http://git.infradead.org/users/dedekind/l2-mtd-2.6.git
>
> Can we add that tree to linux-next?
Well... This is not the first time you are requesting this :) Up to
dwmw2, but alternatively, he could just look at my tree more often.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-21 18:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20 22:23 [patch 1/4] mtd/sst25l: check for null consistently akpm
2010-07-21 10:34 ` Artem Bityutskiy
2010-07-21 17:16 ` Andrew Morton
2010-07-21 18:10 ` 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).