Re: [PATCH v3] iio: adc: ad7768-1: Fix ERR_PTR dereference in ad7768_fill_scale_tbl

From: Jonathan Cameron

Date: Wed Feb 18 2026 - 14:44:18 EST


On Mon, 16 Feb 2026 09:35:05 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Sat, Feb 14, 2026 at 12:46:37PM -0600, Ethan Tidmore wrote:
> > The function iio_get_current_scan_type() can return an error pointer,
> > the return value scan_type is not checked for this and immediately
> > dereferenced which can cause a kernel panic.
> >
> > Add check for IS_ERR() and propagate the error back.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>

Applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan