summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/power_allocator.c
diff options
context:
space:
mode:
authorJavi Merino <javi.merino@arm.com>2015-08-25 20:22:35 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-08-29 19:10:47 +0200
commit9751a9e449da2a7749d89968039d532c615beeaa (patch)
treed04a620c88f9c0107a9941bec72d9efcd8f1e98d /drivers/thermal/power_allocator.c
parentMerge branch 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
downloadlinux-9751a9e449da2a7749d89968039d532c615beeaa.tar.xz
linux-9751a9e449da2a7749d89968039d532c615beeaa.zip
thermal: power_allocator: allocate with kcalloc what you free with kfree
Commit cf736ea6f902 ("thermal: power_allocator: do not use devm* interfaces") forgot to change a devm_kcalloc() to just kcalloc(), but it's corresponding devm_kfree() was changed to kfree(). Allocate with kcalloc() to match the kfree(). Fixes: cf736ea6f902 ("thermal: power_allocator: do not use devm* interfaces") Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Javi Merino <javi.merino@arm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/thermal/power_allocator.c')
-rw-r--r--drivers/thermal/power_allocator.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c
index 7006860f2f36..251676902869 100644
--- a/drivers/thermal/power_allocator.c
+++ b/drivers/thermal/power_allocator.c
@@ -258,8 +258,7 @@ static int allocate_power(struct thermal_zone_device *tz,
BUILD_BUG_ON(sizeof(*req_power) != sizeof(*granted_power));
BUILD_BUG_ON(sizeof(*req_power) != sizeof(*extra_actor_power));
BUILD_BUG_ON(sizeof(*req_power) != sizeof(*weighted_req_power));
- req_power = devm_kcalloc(&tz->device, num_actors * 5,
- sizeof(*req_power), GFP_KERNEL);
+ req_power = kcalloc(num_actors * 5, sizeof(*req_power), GFP_KERNEL);
if (!req_power) {
ret = -ENOMEM;
goto unlock;