linux/drivers/powercap
Colin Ian King 5f1e1f42a5 UPSTREAM: powercap/drivers/dtpm: Fix size of object being allocated
The kzalloc allocation for dtpm_cpu is currently allocating the size
of the pointer and not the size of the structure. Fix this by using
the correct sizeof argument.

Addresses-Coverity: ("Wrong sizeof argument")
Fixes: 0e8f68d7f0 ("powercap/drivers/dtpm: Add CPU energy model based support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Link: https://www.spinics.net/lists/linux-kernel-janitors/msg56960.html
Bug: 182396925
Change-Id: Iac5e069ca027136d85089b8eab9ba6dfe10034b7
(cherry picked from commit 66e713fbbb)
Signed-off-by: Ram Chandrasekar <quic_rkumbako@quicinc.com>
2021-03-11 16:17:37 +00:00
..
dtpm_cpu.c UPSTREAM: powercap/drivers/dtpm: Fix size of object being allocated 2021-03-11 16:17:37 +00:00
dtpm.c UPSTREAM: powercap/drivers/dtpm: Fix an IS_ERR() vs NULL check 2021-03-11 16:17:29 +00:00
idle_inject.c powercap: include header to fix -Wmissing-prototypes 2020-09-25 16:46:01 +02:00
intel_rapl_common.c powercap/intel_rapl: remove unneeded semicolon 2020-11-02 18:04:34 +01:00
intel_rapl_msr.c powercap/intel_rapl: enumerate Psys RAPL domain together with package RAPL domain 2020-10-16 17:35:36 +02:00
Kconfig UPSTREAM: powercap/drivers/dtpm: Add CPU energy model based support 2021-03-11 16:16:38 +00:00
Makefile UPSTREAM: powercap/drivers/dtpm: Add CPU energy model based support 2021-03-11 16:16:38 +00:00
powercap_sys.c powercap: restrict energy meter to root access 2020-11-10 11:40:57 -05:00