Skip to content
Commit 51fafb3c authored by Marius Cristea's avatar Marius Cristea Committed by Jonathan Cameron
Browse files

iio: adc: PAC1934: fix accessing out of bounds array index

Fix accessing out of bounds array index for average
current and voltage measurements. The device itself has
only 4 channels, but in sysfs there are "fake"
channels for the average voltages and currents too.

Fixes: 0fb528c8

 ("iio: adc: adding support for PAC193x")
Reported-by: default avatarConor Dooley <conor.dooley@microchip.com>
Signed-off-by: default avatarMarius Cristea <marius.cristea@microchip.com>
Closes: https://lore.kernel.org/linux-iio/20240405-embellish-bonnet-ab5f10560d93@wendy/
Tested-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240425114232.81390-1-marius.cristea@microchip.com
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent bf8367b0
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