Re: [PATCH v5 2/2] iio: adc: add Axiado SARADC driver

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Mon, Aug 17, 2026 at 01:56:10PM +0200, Joshua Crofts wrote:
> On Mon, 10 Aug 2026 21:27:26 +0300
> Andy Shevchenko <[email protected]> wrote:

...

> > > +	soc_data = device_get_match_data(dev);
> > > +	if (!soc_data)
> > > +		return dev_err_probe(dev, -EINVAL, "failed to get match data\n");  
> > 
> > -ENODATA
> 
> Hmmm, I always thought it should be -ENODEV. (`grep -Rb5a5 "device_get_match_data"
> drivers/iio/` confirms this, but maybe it's just wrong to begin with, a few
> instances even have checks missing).

After a (small) discussion in this list, it seems that -ENODATA suits better as
there are less chances to get that from other frameworks and calls. EINVAL, ENODEV
are way too much overloaded with the meanings.

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.