Commit 06c3a41
iio: adc: ad7606: check for NULL before calling sw_mode_config()
BugLink: https://bugs.launchpad.net/bugs/2115266
[ Upstream commit 5257d80e22bf27009d6742e4c174f42cfe54e425 ]
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: e571c19 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
CVE-2025-38025
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>1 parent 2e1d5e0 commit 06c3a41
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1228 | 1228 | | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
1234 | 1236 | | |
1235 | 1237 | | |
1236 | 1238 | | |
| |||
1261 | 1263 | | |
1262 | 1264 | | |
1263 | 1265 | | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
1264 | 1269 | | |
1265 | 1270 | | |
1266 | 1271 | | |
| |||
0 commit comments