Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-16 Thread Corentin LABBE
Le 16/11/2015 19:33, Brian Norris a écrit : > On Thu, Nov 12, 2015 at 09:19:09AM +0100, Uwe Kleine-König wrote: >> I really wonder there is no helper >> function like: >> >> #define of_sensible_name(dev) >> of_match_device(dev->driver->of_match_table, dev) > > How about

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-16 Thread Brian Norris
On Thu, Nov 12, 2015 at 09:19:09AM +0100, Uwe Kleine-König wrote: > I really wonder there is no helper > function like: > > #define of_sensible_name(dev) > of_match_device(dev->driver->of_match_table, dev) How about of_device_get_match_data()? It's not exactly what you asked for, but

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-16 Thread Corentin LABBE
Le 16/11/2015 19:33, Brian Norris a écrit : > On Thu, Nov 12, 2015 at 09:19:09AM +0100, Uwe Kleine-König wrote: >> I really wonder there is no helper >> function like: >> >> #define of_sensible_name(dev) >> of_match_device(dev->driver->of_match_table, dev) > > How about

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-16 Thread Brian Norris
On Thu, Nov 12, 2015 at 09:19:09AM +0100, Uwe Kleine-König wrote: > I really wonder there is no helper > function like: > > #define of_sensible_name(dev) > of_match_device(dev->driver->of_match_table, dev) How about of_device_get_match_data()? It's not exactly what you asked for, but

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
Hello, On Thu, Nov 12, 2015 at 11:03:28AM +0100, LABBE Corentin wrote: > On Thu, Nov 12, 2015 at 09:19:09AM +0100, Uwe Kleine-König wrote: > > Hello Corentin, > > > > On Thu, Nov 12, 2015 at 08:46:55AM +0100, LABBE Corentin wrote: > > > of_match_device could return NULL, and so cause a NULL

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread LABBE Corentin
On Thu, Nov 12, 2015 at 09:19:09AM +0100, Uwe Kleine-König wrote: > Hello Corentin, > > On Thu, Nov 12, 2015 at 08:46:55AM +0100, LABBE Corentin wrote: > > of_match_device could return NULL, and so cause a NULL pointer > > dereference later. > > > > Signed-off-by: LABBE Corentin > > --- > >

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
On Thu, Nov 12, 2015 at 09:57:07AM +0100, Frans Klaver wrote: > On Thu, Nov 12, 2015 at 9:53 AM, Uwe Kleine-König > wrote: > > CC += devicet...@vger.kernel.org, gregkh > > You added linux@pengutronix instead of devicetree. Well I substituted Sascha by ker...@pengutronix.de on purpose, but

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Frans Klaver
On Thu, Nov 12, 2015 at 9:53 AM, Uwe Kleine-König wrote: > CC += devicet...@vger.kernel.org, gregkh You added linux@pengutronix instead of devicetree. > > On Thu, Nov 12, 2015 at 09:36:55AM +0100, Frans Klaver wrote: >> On Thu, Nov 12, 2015 at 9:26 AM, Uwe Kleine-König >> wrote: >> > On Thu,

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
CC += devicet...@vger.kernel.org, gregkh On Thu, Nov 12, 2015 at 09:36:55AM +0100, Frans Klaver wrote: > On Thu, Nov 12, 2015 at 9:26 AM, Uwe Kleine-König > wrote: > > On Thu, Nov 12, 2015 at 09:03:11AM +0100, Frans Klaver wrote: > >> Hi, > >> > >> On Thu, Nov 12, 2015 at 8:46 AM, LABBE Corentin

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Frans Klaver
On Thu, Nov 12, 2015 at 9:26 AM, Uwe Kleine-König wrote: > On Thu, Nov 12, 2015 at 09:03:11AM +0100, Frans Klaver wrote: >> Hi, >> >> On Thu, Nov 12, 2015 at 8:46 AM, LABBE Corentin >> wrote: >> > of_match_device could return NULL, and so cause a NULL pointer >> > dereference later. >> >> Did

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
On Thu, Nov 12, 2015 at 09:03:11AM +0100, Frans Klaver wrote: > Hi, > > On Thu, Nov 12, 2015 at 8:46 AM, LABBE Corentin > wrote: > > of_match_device could return NULL, and so cause a NULL pointer > > dereference later. > > Did you actually run into this? It seems to me that this driver is >

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
Hello Corentin, On Thu, Nov 12, 2015 at 08:46:55AM +0100, LABBE Corentin wrote: > of_match_device could return NULL, and so cause a NULL pointer > dereference later. > > Signed-off-by: LABBE Corentin > --- > drivers/mtd/nand/mxc_nand.c | 6 -- > 1 file changed, 4 insertions(+), 2

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Frans Klaver
Hi, On Thu, Nov 12, 2015 at 8:46 AM, LABBE Corentin wrote: > of_match_device could return NULL, and so cause a NULL pointer > dereference later. Did you actually run into this? It seems to me that this driver is only probed if and only if we have a match and that therefore of_match_device will

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
CC += devicet...@vger.kernel.org, gregkh On Thu, Nov 12, 2015 at 09:36:55AM +0100, Frans Klaver wrote: > On Thu, Nov 12, 2015 at 9:26 AM, Uwe Kleine-König > wrote: > > On Thu, Nov 12, 2015 at 09:03:11AM +0100, Frans Klaver wrote: > >> Hi, > >> > >> On Thu, Nov 12,

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread LABBE Corentin
On Thu, Nov 12, 2015 at 09:19:09AM +0100, Uwe Kleine-König wrote: > Hello Corentin, > > On Thu, Nov 12, 2015 at 08:46:55AM +0100, LABBE Corentin wrote: > > of_match_device could return NULL, and so cause a NULL pointer > > dereference later. > > > > Signed-off-by: LABBE Corentin

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Frans Klaver
Hi, On Thu, Nov 12, 2015 at 8:46 AM, LABBE Corentin wrote: > of_match_device could return NULL, and so cause a NULL pointer > dereference later. Did you actually run into this? It seems to me that this driver is only probed if and only if we have a match and that

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Frans Klaver
On Thu, Nov 12, 2015 at 9:53 AM, Uwe Kleine-König wrote: > CC += devicet...@vger.kernel.org, gregkh You added linux@pengutronix instead of devicetree. > > On Thu, Nov 12, 2015 at 09:36:55AM +0100, Frans Klaver wrote: >> On Thu, Nov 12, 2015 at 9:26 AM, Uwe

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
On Thu, Nov 12, 2015 at 09:03:11AM +0100, Frans Klaver wrote: > Hi, > > On Thu, Nov 12, 2015 at 8:46 AM, LABBE Corentin > wrote: > > of_match_device could return NULL, and so cause a NULL pointer > > dereference later. > > Did you actually run into this? It seems to

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
On Thu, Nov 12, 2015 at 09:57:07AM +0100, Frans Klaver wrote: > On Thu, Nov 12, 2015 at 9:53 AM, Uwe Kleine-König > wrote: > > CC += devicet...@vger.kernel.org, gregkh > > You added linux@pengutronix instead of devicetree. Well I substituted Sascha by

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
Hello Corentin, On Thu, Nov 12, 2015 at 08:46:55AM +0100, LABBE Corentin wrote: > of_match_device could return NULL, and so cause a NULL pointer > dereference later. > > Signed-off-by: LABBE Corentin > --- > drivers/mtd/nand/mxc_nand.c | 6 -- > 1 file changed, 4

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Frans Klaver
On Thu, Nov 12, 2015 at 9:26 AM, Uwe Kleine-König wrote: > On Thu, Nov 12, 2015 at 09:03:11AM +0100, Frans Klaver wrote: >> Hi, >> >> On Thu, Nov 12, 2015 at 8:46 AM, LABBE Corentin >> wrote: >> > of_match_device could return NULL, and

Re: [PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-12 Thread Uwe Kleine-König
Hello, On Thu, Nov 12, 2015 at 11:03:28AM +0100, LABBE Corentin wrote: > On Thu, Nov 12, 2015 at 09:19:09AM +0100, Uwe Kleine-König wrote: > > Hello Corentin, > > > > On Thu, Nov 12, 2015 at 08:46:55AM +0100, LABBE Corentin wrote: > > > of_match_device could return NULL, and so cause a NULL

[PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-11 Thread LABBE Corentin
of_match_device could return NULL, and so cause a NULL pointer dereference later. Signed-off-by: LABBE Corentin --- drivers/mtd/nand/mxc_nand.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index

[PATCH] mtd: nand: mxc_nand: fix a possible NULL dereference

2015-11-11 Thread LABBE Corentin
of_match_device could return NULL, and so cause a NULL pointer dereference later. Signed-off-by: LABBE Corentin --- drivers/mtd/nand/mxc_nand.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c