Marius Cristea 51fafb3cd7 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: 0fb528c8255b ("iio: adc: adding support for PAC193x")
Reported-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Marius Cristea <marius.cristea@microchip.com>
Closes: https://lore.kernel.org/linux-iio/20240405-embellish-bonnet-ab5f10560d93@wendy/
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240425114232.81390-1-marius.cristea@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-05-03 11:48:56 +01:00
..
2023-02-18 17:06:09 +00:00
2022-07-16 18:50:24 +01:00
2023-08-13 22:14:51 +02:00
2023-09-12 10:42:04 +01:00
2023-09-12 10:42:04 +01:00
2022-09-05 18:08:34 +01:00
2023-05-30 21:07:15 +01:00