Re: [PATCH] ASoC: rsnd: fix a possible NULL dereference

2015-11-30 Thread Mark Brown
On Thu, Nov 26, 2015 at 08:17:15AM +0100, LABBE Corentin wrote: > On Wed, Nov 25, 2015 at 11:46:45PM +, Kuninori Morimoto wrote: > > > + of_data = of_device_get_match_data(dev); > > > + if (!of_data) > > > + return 1; > > return 1 ? > > You want to use -EINVAL ? > I do that Uwe

Re: [PATCH] ASoC: rsnd: fix a possible NULL dereference

2015-11-30 Thread Mark Brown
On Thu, Nov 26, 2015 at 08:17:15AM +0100, LABBE Corentin wrote: > On Wed, Nov 25, 2015 at 11:46:45PM +, Kuninori Morimoto wrote: > > > + of_data = of_device_get_match_data(dev); > > > + if (!of_data) > > > + return 1; > > return 1 ? > > You want to use -EINVAL ? > I do that Uwe

Re: [PATCH] ASoC: rsnd: fix a possible NULL dereference

2015-11-25 Thread LABBE Corentin
On Wed, Nov 25, 2015 at 11:46:45PM +, Kuninori Morimoto wrote: > > Hi LABBE > > Thank you for your patch > > > of_match_device could return NULL, and so cause a NULL pointer > > dereference later. > > Even if the probability of this case is very low, fixing it made > > static analyzers

Re: [PATCH] ASoC: rsnd: fix a possible NULL dereference

2015-11-25 Thread Kuninori Morimoto
Hi LABBE Thank you for your patch > of_match_device could return NULL, and so cause a NULL pointer > dereference later. > Even if the probability of this case is very low, fixing it made > static analyzers happy. > Solving this with of_device_get_match_data made also code simplier. > >

[PATCH] ASoC: rsnd: fix a possible NULL dereference

2015-11-25 Thread LABBE Corentin
of_match_device could return NULL, and so cause a NULL pointer dereference later. Even if the probability of this case is very low, fixing it made static analyzers happy. Solving this with of_device_get_match_data made also code simplier. Signed-off-by: LABBE Corentin ---

Re: [PATCH] ASoC: rsnd: fix a possible NULL dereference

2015-11-25 Thread Kuninori Morimoto
Hi LABBE Thank you for your patch > of_match_device could return NULL, and so cause a NULL pointer > dereference later. > Even if the probability of this case is very low, fixing it made > static analyzers happy. > Solving this with of_device_get_match_data made also code simplier. > >

Re: [PATCH] ASoC: rsnd: fix a possible NULL dereference

2015-11-25 Thread LABBE Corentin
On Wed, Nov 25, 2015 at 11:46:45PM +, Kuninori Morimoto wrote: > > Hi LABBE > > Thank you for your patch > > > of_match_device could return NULL, and so cause a NULL pointer > > dereference later. > > Even if the probability of this case is very low, fixing it made > > static analyzers

[PATCH] ASoC: rsnd: fix a possible NULL dereference

2015-11-25 Thread LABBE Corentin
of_match_device could return NULL, and so cause a NULL pointer dereference later. Even if the probability of this case is very low, fixing it made static analyzers happy. Solving this with of_device_get_match_data made also code simplier. Signed-off-by: LABBE Corentin