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

From: Mark Brown
Date: Mon Nov 30 2015 - 11:39:11 EST


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.

Attachment: signature.asc
Description: PGP signature