Guenter Roeck d56e460e19 hwmon: (nct6775) Fix access to temperature configuration registers
The number of temperature configuration registers does
not always match the total number of temperature registers.
This can result in access errors reported if KASAN is enabled.

BUG: KASAN: global-out-of-bounds in nct6775_probe+0x5654/0x6fe9 nct6775_core

Reported-by: Erhard Furtner <erhard_f@mailbox.org>
Closes: https://lore.kernel.org/linux-hwmon/d51181d1-d26b-42b2-b002-3f5a4037721f@roeck-us.net/
Fixes: b7f1f7b2523a ("hwmon: (nct6775) Additional TEMP registers for nct6799")
Cc: Ahmad Khalifa <ahmad@khalifa.ws>
Tested-by: Ahmad Khalifa <ahmad@khalifa.ws>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-21 13:56:33 -08:00
..
2023-12-11 06:21:01 -08:00
2023-04-27 11:53:57 -07:00
2023-10-28 09:21:59 -07:00
2022-02-27 17:03:19 -08:00
2024-01-08 07:26:34 -08:00
2023-12-11 06:20:28 -08:00
2023-10-31 17:44:17 -10:00