Files
linux/drivers/iio/adc
Ethan Tidmore dd6183e427 iio: adc: ad7768-1: Fix ERR_PTR dereference in ad7768_fill_scale_tbl
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.

Fixes: ff085189cb ("iio: adc: ad7768-1: add support for ADAQ776x-1 ADC Family")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202602051234.5gArzLyZ-lkp@intel.com/
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-02-23 08:24:38 +00:00
..
2026-01-11 13:30:29 +00:00
2025-03-11 19:08:56 +00:00
2024-11-03 20:33:44 +00:00
2025-06-26 19:32:52 +01:00
2025-04-22 19:10:04 +01:00
2024-09-30 09:21:02 +01:00
2025-04-22 19:10:04 +01:00
2026-01-11 13:30:29 +00:00
2025-10-20 18:51:04 +01:00
2025-04-22 19:10:04 +01:00
2025-09-13 15:00:48 +01:00