Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f25f066 authored by Xiaolong Ye's avatar Xiaolong Ye Committed by MyungJoo Ham
Browse files

PM / devfreq: Fix incorrect type issue.



time_in_state in struct devfreq is defined as unsigned long, so
devm_kzalloc should use sizeof(unsigned long) as argument instead
of sizeof(unsigned int), otherwise it will cause unexpected result
in 64bit system.

Signed-off-by: default avatarXiaolong Ye <yexl@marvell.com>
Signed-off-by: default avatarKevin Liu <kliu5@marvell.com>
Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
parent 14de3903
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -482,7 +482,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
						devfreq->profile->max_state *
						devfreq->profile->max_state,
						GFP_KERNEL);
	devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned int) *
	devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned long) *
						devfreq->profile->max_state,
						GFP_KERNEL);
	devfreq->last_stat_updated = jiffies;