Re: [PATCH v8 2/8] iio: dac: ad5686: missing NULL check on match data

Rodrigo Alencar <[email protected]>
Newsgroups org.kernel.vger.linux-hardening,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <ondynh4kmchzugk2l24klamrcaje3qxnhgiks7gnc46wwwvo35@hysk2zaimb2e>
On 16/07/26 21:42, Andy Shevchenko wrote:
> On Thu, Jul 16, 2026 at 01:14:18PM +0100, Rodrigo Alencar via B4 Relay wrote:
> 
> > Verify that chip_info pointer is not NULL. If a user binds the driver
> > using driver_override via sysfs with a device name not present in the
> > id_table or of_match_table, match data will be NULL.
> 
> ...
> 
> >  	struct iio_dev *indio_dev;
> >  	int ret, i;
> 
> 
> Move an assignment here as well.
> 
> 	chip_info = ...

assignment? this is an input param validation

> 
> > +	if (!chip_info)
> > +		return -ENODEV;

-- 
Kind regards,

Rodrigo Alencar
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.