linux-stable/drivers/iio/adc
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: 0fb528c825 ("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
..
ab8500-gpadc.c iio: adc: ab8500-gpadc: Use device_for_each_child_node_scoped() to simplify erorr paths. 2024-04-06 11:29:06 +01:00
ad799x.c iio: adc: ad799x: Prefer to use octal permission 2024-04-29 20:57:56 +01:00
ad4130.c iio: adc: ad4130: Use device_for_each_child_node_scoped() to simplify error paths. 2024-04-06 11:29:06 +01:00
ad7091r-base.c iio: adc: ad7091r-base: Use auto cleanup of locks. 2024-02-17 16:16:11 +00:00
ad7091r-base.h iio: adc: Add support for AD7091R-8 2023-12-26 15:43:33 +00:00
ad7091r5.c iio: adc: ad7091r: Add chip_info callback to get conversion result channel 2023-12-26 15:42:24 +00:00
ad7091r8.c iio: adc: ad7091r8: Fix error code in ad7091r8_gpio_setup() 2024-01-22 18:59:07 +00:00
ad7124.c iio: adc: ad7124: Switch from of specific to fwnode based property handling 2024-03-25 19:50:09 +00:00
ad7173.c iio: adc: ad7173: Fix ! vs ~ typo in ad7173_sel_clk() 2024-04-06 16:43:47 +01:00
ad7192.c iio: adc: ad7192: Convert from of specific to fwnode property handling 2024-03-25 19:50:09 +00:00
ad7266.c iio: adc: ad7266: don't set masklength 2024-04-29 20:53:24 +01:00
ad7280a.c
ad7291.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
ad7292.c iio: adc: ad7292: Switch from of specific to fwnode property handling 2024-03-25 19:50:09 +00:00
ad7298.c
ad7476.c
ad7606.c iio: Rename iio_trigger_poll_chained and add kernel-doc 2023-03-11 12:18:29 +00:00
ad7606.h
ad7606_par.c
ad7606_spi.c
ad7766.c
ad7768-1.c
ad7780.c
ad7791.c iio: adc: ad7791: fix IRQ flags 2023-02-18 17:06:09 +00:00
ad7793.c
ad7887.c
ad7923.c
ad7944.c iio: adc: ad7944: add support for chain mode 2024-04-29 20:53:25 +01:00
ad7949.c
ad9467.c iio: adc: ad9467: support digital interface calibration 2024-04-29 20:53:26 +01:00
ad_sigma_delta.c iio: adc: ad_sigma_delta: use 'time_left' variable with wait_for_completion_timeout() 2024-04-29 21:06:17 +01:00
adi-axi-adc.c iio: adc: adi-axi-adc: support digital interface calibration 2024-04-29 20:53:26 +01:00
aspeed_adc.c
at91-sama5d2_adc.c iio: adc: at91-sama5d2: Convert to platform remove callback returning void 2023-09-23 15:06:52 +01:00
at91_adc.c iio: adc: at91: Convert to platform remove callback returning void 2023-09-23 15:06:53 +01:00
axp20x_adc.c iio: adc: axp20x: Convert to platform remove callback returning void 2023-09-23 15:06:53 +01:00
axp288_adc.c
bcm_iproc_adc.c iio: adc: bcm_iproc: Convert to platform remove callback returning void 2023-09-23 15:06:53 +01:00
berlin2-adc.c iio: adc: berlin2-adc: Add missing of_node_put() in error path 2022-12-28 17:20:03 +00:00
cc10001_adc.c iio: adc: Explicitly include correct DT includes 2023-07-23 13:38:13 +01:00
cpcap-adc.c
da9150-gpadc.c
dln2-adc.c iio: adc: dln2: Convert to platform remove callback returning void 2023-09-23 15:06:53 +01:00
envelope-detector.c
ep93xx_adc.c iio: adc: ep93xx: Convert to platform remove callback returning void 2023-09-23 15:06:53 +01:00
exynos_adc.c iio: adc: exynos_adc: use 'time_left' variable with wait_for_completion_timeout() 2024-04-29 21:06:18 +01:00
fsl-imx25-gcq.c iio: adc: fsl-imx25-gcq: use 'time_left' variable with wait_for_completion_interruptible_timeout() 2024-04-29 21:06:18 +01:00
hi8435.c
hx711.c iio: adc: hx711: Switch from of specific to fwnode property handling. 2024-03-25 19:50:10 +00:00
imx7d_adc.c iio: adc: Remove redundant dev_err_probe() 2023-07-29 12:13:17 +01:00
imx8qxp-adc.c IIO: 1st set of new device support, features and cleanup for 6.7 2023-10-20 07:54:15 +02:00
imx93_adc.c iio: adc: imx93: add four channels for imx93 adc 2023-12-04 09:56:28 +00:00
ina2xx-adc.c Merge 6.5-rc6 into char-misc-next 2023-08-13 22:14:51 +02:00
ingenic-adc.c
intel_mrfld_adc.c iio: adc: intel_mrfld_adc: use 'time_left' variable with wait_for_completion_interruptible_timeout() 2024-04-29 21:06:18 +01:00
Kconfig iio: adc: ad7944: add driver for AD7944/AD7985/AD7986 2024-03-25 20:10:13 +00:00
lp8788_adc.c
lpc18xx_adc.c
lpc32xx_adc.c iio: adc: fix the return value handle for platform_get_irq() 2023-07-29 16:23:45 +01:00
ltc2309.c iio: adc: add ltc2309 support 2023-09-12 10:42:04 +01:00
ltc2471.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
ltc2485.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
ltc2496.c
ltc2497-core.c
ltc2497.c iio: adc: ltc2497: Simplify probe() 2023-09-12 10:42:04 +01:00
ltc2497.h
Makefile iio: adc: ad7944: add driver for AD7944/AD7985/AD7986 2024-03-25 20:10:13 +00:00
max1027.c
max1118.c
max1241.c
max1363.c iio: adc: max1363: Use automatic cleanup for locks and iio mode claiming. 2024-02-17 16:16:10 +00:00
max9611.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
max11100.c
max11205.c
max11410.c iio: adc: max11410: Use device_for_each_child_node_scoped() 2024-03-25 19:50:09 +00:00
max34408.c iio: adc: Add driver support for MAX34408/9 2023-11-16 19:10:25 +00:00
max77541-adc.c iio: adc: max77541: Add ADI MAX77541 ADC Support 2023-06-28 15:18:11 +01:00
mcp320x.c iio: adc: mcp320x: Simplify device removal logic 2024-02-28 19:26:35 +00:00
mcp3422.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
mcp3564.c iio: adc: mcp3564: Use device_for_each_child_node_scoped() 2024-04-29 20:55:24 +01:00
mcp3911.c iio: adc: mcp3911: simplify code with guard macro 2023-12-10 11:36:38 +00:00
men_z188_adc.c iio: adc: men_z188_adc: Remove redundant initialization owner in men_z188_driver 2023-08-05 17:43:17 +01:00
meson_saradc.c iio: adc: meson: add separate config for axg SoC family 2023-12-04 10:36:07 +00:00
mp2629_adc.c iio: adc: mp2629: Convert to platform remove callback returning void 2023-09-23 15:06:53 +01:00
mt6360-adc.c
mt6370-adc.c iio: adc: mt6370: Fix ibus and ibat scaling value of some specific vendor ID chips 2023-05-13 17:54:56 +01:00
mt6577_auxadc.c iio: adc: mt6577_auxadc: Fix kernel panic on suspend 2023-10-11 15:54:40 +01:00
mxs-lradc-adc.c iio: adc: mxs-lradc-adc: don't set masklength 2024-04-29 20:53:24 +01:00
nau7802.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
npcm_adc.c iio: adc: npcm: Convert to platform remove callback returning void 2023-09-23 15:06:54 +01:00
pac1934.c iio: adc: PAC1934: fix accessing out of bounds array index 2024-05-03 11:48:56 +01:00
palmas_gpadc.c iio: adc: palmas_gpadc: Drop duplicated the in comment. 2023-09-23 18:38:18 +01:00
qcom-pm8xxx-xoadc.c iio: adc: qcom-pm8xxx-xoadc: drop unused kerneldoc struct pm8xxx_chan_info member 2024-02-28 19:26:38 +00:00
qcom-spmi-adc5.c iio: adc: qcom-spmi-adc5: Use device_for_each_child_node_scoped() 2024-04-13 10:38:05 +01:00
qcom-spmi-iadc.c iio: adc: Explicitly include correct DT includes 2023-07-23 13:38:13 +01:00
qcom-spmi-rradc.c
qcom-spmi-vadc.c iio: adc: qcom-spmi-vadc: Propagate fw node label to userspace 2023-05-13 18:28:10 +01:00
qcom-vadc-common.c
rcar-gyroadc.c iio: adc: rcar-gyroadc: use for_each_available_child_node_scoped() 2024-03-25 19:53:08 +00:00
rn5t618-adc.c
rockchip_saradc.c iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive 2024-02-28 19:26:37 +00:00
rtq6056.c iio: adc: rtq6056: Use automated cleanup for mode handling in write_raw 2024-04-29 20:53:10 +01:00
rzg2l_adc.c iio: adc: rzg2l_adc: Use device_for_each_child_node_scoped() 2024-03-25 19:50:10 +00:00
sc27xx_adc.c iio: adc: Explicitly include correct DT includes 2023-07-23 13:38:13 +01:00
sd_adc_modulator.c
spear_adc.c iio: adc: spear_adc: Make use of device properties 2024-03-25 20:10:11 +00:00
stm32-adc-core.c iio: Use device_get_match_data() 2023-10-14 17:18:36 +01:00
stm32-adc-core.h
stm32-adc.c iio: adc: stm32-adc: use 'time_left' variable with wait_for_completion_interruptible_timeout() 2024-04-29 21:06:18 +01:00
stm32-dfsdm-adc.c iio: adc: stm32-dfsdm-adc: use 'time_left' variable with wait_for_completion_interruptible_timeout() 2024-04-29 21:06:18 +01:00
stm32-dfsdm-core.c iio: adc: stm32-dfsdm-core: Convert to platform remove callback returning void 2023-09-23 15:06:54 +01:00
stm32-dfsdm.h iio: adc: stm32-dfsdm: add id registers support 2023-01-08 13:11:03 +00:00
stmpe-adc.c iio: adc: Explicitly include correct DT includes 2023-07-23 13:38:13 +01:00
sun4i-gpadc-iio.c iio: adc: sun4i-gpadc-iio: Convert to platform remove callback returning void 2023-09-23 15:06:54 +01:00
sun20i-gpadc-iio.c iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC 2023-07-20 19:21:29 +01:00
ti-adc081c.c iio: adc: ti-adc081c: Simplify probe() 2023-09-12 10:42:04 +01:00
ti-adc084s021.c
ti-adc108s102.c iio: adc: ti-adc109s102: drop ACPI_PTR() and CONFIG_ACPI guards 2024-01-23 22:06:56 +00:00
ti-adc128s052.c iio: adc: ti-adc128s052: Sort headers 2023-01-08 12:12:10 +00:00
ti-adc161s626.c
ti-adc0832.c
ti-adc12138.c
ti-ads124s08.c
ti-ads131e08.c iio: adc: ti-ads131e08: Use device_for_each_child_node_scoped() to simplify error paths. 2024-04-21 18:42:33 +01:00
ti-ads1015.c iio: adc: ti-ads1015: use device_for_each_child_node_scoped() 2024-04-29 21:00:10 +01:00
ti-ads1100.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
ti-ads1298.c iio: adc: ti-ads1298: prevent divide by zero in ads1298_set_samp_freq() 2024-02-28 19:26:36 +00:00
ti-ads7924.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
ti-ads7950.c iio: adc: ti-ads7950: Set can_sleep flag for GPIO chip 2023-03-18 16:39:35 +00:00
ti-ads8344.c
ti-ads8688.c iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id definition 2024-02-28 19:26:35 +00:00
ti-lmp92064.c iio: adc: ti-lmp92064: add buffering support 2023-07-20 19:21:30 +01:00
ti-tlc4541.c
ti-tsc2046.c
ti_am335x_adc.c iio: adc: ti_am335x_adc: Fix return value check of tiadc_request_dma() 2023-12-04 09:31:51 +00:00
twl4030-madc.c iio: adc: twl4030-madc: Make use of device properties 2024-03-25 20:10:13 +00:00
twl6030-gpadc.c iio: adc: twl6030-gpadc: use 'time_left' variable with wait_for_completion_interruptible_timeout() 2024-04-29 21:06:18 +01:00
vf610_adc.c iio: adc: vf610_adc: Convert to platform remove callback returning void 2023-09-23 15:06:54 +01:00
viperboard_adc.c
xilinx-ams.c iio: adc: Use devm_krealloc_array 2023-05-30 21:07:15 +01:00
xilinx-xadc-core.c iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale 2023-10-13 19:10:39 +01:00
xilinx-xadc-events.c
xilinx-xadc.h iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale 2023-10-13 19:10:39 +01:00