diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2026-10-27 17:19:09 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-11-02 00:40:18 +0000 |
| commit | 905b5d93b795b0e2311a8c855c1cdd97c9cc2989 (patch) | |
| tree | 1afd0ae3384ad8ba3339dd7732246c2ebb28a15d /rust/kernel/alloc/allocator | |
| parent | 594157b4f3f64db5833dee679194c33a5968f92e (diff) | |
iio: adc: check the result of ad_sd_init()
ad_sd_init() asks for the optional "rdy" GPIO and returns the error if
that fails, for instance -EPROBE_DEFER. The binding of the AD7780
describes such a GPIO.
ad7780, ad7791, ad7793 and max11205 ignore the result. The function has
then returned before it set the driver data of the IIO device, which
devm_ad_sd_setup_buffer_and_trigger() dereferences a few lines further
down in these probe functions, and sigma_delta->rdy_gpiod holds an
ERR_PTR() which ad_sigma_delta_clear_pending_event() takes for a GPIO.
Return the error, as the other users of the library do.
Fixes: a87ef09b1fdf ("iio: adc: ad_sigma_delta: Add support for reading irq status using a GPIO")
Cc: stable <stable@kernel.org>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions
