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

Commit dc65a54d authored by Suman Tatiraju's avatar Suman Tatiraju
Browse files

PM / devfreq: Allocate memory using the right data type



Long and int have different sizes on a 64-bit machine. Allocate
memory for the time_in_state table using the right data type.

Change-Id: Iecc1acc12ddabdb436c212f205aaed8dbb49a2b4
Signed-off-by: default avatarSuman Tatiraju <sumant@codeaurora.org>
parent 512fe370
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -505,7 +505,8 @@ 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(*(devfreq->time_in_state)) *
					devfreq->profile->max_state,
					GFP_KERNEL);
	devfreq->last_stat_updated = jiffies;