David Arcari 84e261553e hwmon: (amd_energy) fix allocation of hwmon_channel_info config
hwmon, specifically hwmon_num_channel_attrs, expects the config
array in the hwmon_channel_info structure to be terminated by
a zero entry.  amd_energy does not honor this convention.  As
result, a KASAN warning is possible.  Fix this by adding an
additional entry and setting it to zero.

Fixes: 8abee9566b7e ("hwmon: Add amd_energy driver to report energy counters")

Signed-off-by: David Arcari <darcari@redhat.com>
Cc: Naveen Krishna Chatradhi <nchatrad@amd.com>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: David Arcari <darcari@redhat.com>
Acked-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Link: https://lore.kernel.org/r/20210107144707.6927-1-darcari@redhat.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-08 07:31:03 -08:00
..
2019-10-18 19:37:08 +01:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-24 07:44:51 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:41 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-05-22 06:28:38 -07:00
2020-09-23 09:42:40 -07:00
2020-10-04 08:40:10 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2019-11-06 14:37:19 -08:00
2019-11-06 14:37:19 -08:00
2019-11-06 14:37:19 -08:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-12-02 17:42:24 -08:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00