diff options
author | David Lechner <dlechner@baylibre.com> | 2025-03-18 17:52:09 -0500 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-04-07 19:32:49 +0100 |
commit | 5257d80e22bf27009d6742e4c174f42cfe54e425 (patch) | |
tree | d38da90512ad4e7bcd65bf20bef98d660084135b /lib/net_utils.c | |
parent | f063a28002e3350088b4577c5640882bf4ea17ea (diff) |
iio: adc: ad7606: check for NULL before calling sw_mode_config()
Check that the sw_mode_config function pointer is not NULL before
calling it. Not all buses define this callback, which resulted in a NULL
pointer dereference.
Fixes: e571c1902116 ("iio: adc: ad7606: move scale_setup as function pointer on chip-info")
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-1-4b605427774c@baylibre.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions