[alsa-devel] [PATCH] ASoC: rsnd: fix a possible NULL dereference

Mark Brown broonie at kernel.org
Mon Nov 30 17:38:56 CET 2015


On Thu, Nov 26, 2015 at 08:17:15AM +0100, LABBE Corentin wrote:
> On Wed, Nov 25, 2015 at 11:46:45PM +0000, 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 Kleine-König said to me to do in others thread:
> https://lkml.org/lkml/2015/11/12/70 and https://lkml.org/lkml/2015/11/16/211

What error code to return is going to depend on the context - you need
to look at what the caller is expecting and how it will handle the value
returned.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20151130/77ccad28/attachment.sig>


More information about the Alsa-devel mailing list