Skip to content
Commit da6c6adb authored by Sean Anderson's avatar Sean Anderson Committed by Greg Kroah-Hartman
Browse files

iio: xilinx-ams: Don't include ams_ctrl_channels in scan_mask

[ Upstream commit 89b898c6 ]

ams_enable_channel_sequence constructs a "scan_mask" for all the PS and
PL channels. This works out fine, since scan_index for these channels is
less than 64. However, it also includes the ams_ctrl_channels, where
scan_index is greater than 64, triggering undefined behavior. Since we
don't need these channels anyway, just exclude them.

Fixes: d5c70627

 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: default avatarSean Anderson <sean.anderson@linux.dev>
Link: https://lore.kernel.org/r/20240311162800.11074-1-sean.anderson@linux.dev
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7fb456c3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment