diff options
| author | Antoniu Miclaus <antoniu.miclaus@analog.com> | 2026-03-05 12:14:48 +0300 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-03-14 15:10:21 +0300 |
| commit | aac0a51b16700b403a55b67ba495de021db78763 (patch) | |
| tree | eb1edadde56bd67d58fd55a54c2c7686ca6c1fc6 /include/linux/processor.h | |
| parent | af2f069b78950910ec7932a21544faad5ad8b13f (diff) | |
| download | linux-aac0a51b16700b403a55b67ba495de021db78763.tar.xz | |
iio: frequency: admv1013: fix NULL pointer dereference on str
When device_property_read_string() fails, str is left uninitialized
but the code falls through to strcmp(str, ...), dereferencing a garbage
pointer. Replace manual read/strcmp with
device_property_match_property_string() and consolidate the SE mode
enums into a single sequential enum, mapping to hardware register
values via a switch consistent with other bitfields in the driver.
Several cleanup patches have been applied to this driver recently so
this will need a manual backport.
Fixes: da35a7b526d9 ("iio: frequency: admv1013: add support for ADMV1013")
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/processor.h')
0 files changed, 0 insertions, 0 deletions
