]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: nxp-sar-adc: zero-initialize dma_slave_config
authorShuvam Pandey <shuvampandey1@gmail.com>
Mon, 6 Apr 2026 09:53:24 +0000 (15:38 +0545)
committerJonathan Cameron <jic23@kernel.org>
Fri, 15 May 2026 11:01:38 +0000 (12:01 +0100)
commit8ce176501f836634f9c0419c0820140f968e9dc5
tree618b1f135f62a5c9722c84ad4562060027c1e6c4
parent1f4f0bcc5255dec5c4c3a1551bf49d8c33b69b20
iio: adc: nxp-sar-adc: zero-initialize dma_slave_config

nxp_sar_adc_start_cyclic_dma() only fills the RX-side members of
dma_slave_config before passing it to dmaengine_slave_config().

Zero-initialize the structure so unused members do not contain stack
garbage. Some DMA engines consult optional dma_slave_config fields, so
leaving them uninitialized can cause DMA setup failures.

Fixes: 4434072a893e ("iio: adc: Add the NXP SAR ADC support for the s32g2/3 platforms")
Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/nxp-sar-adc.c