Skip to content

Commit 22916d2

Browse files
mkshahcExactExampl
authored andcommitted
cpuidle: lpm-levels: Correctly check for list empty
Correctly check for list empty condition to get least cluster latency. Change-Id: I56f11e4a80c24d337ee231f6d0bc461a90f1a2ea Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
1 parent 3edad14 commit 22916d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/cpuidle/lpm-levels.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static uint32_t least_cluster_latency(struct lpm_cluster *cluster,
159159
uint32_t latency = 0;
160160
int i;
161161

162-
if (!cluster->list.next) {
162+
if (list_empty(&cluster->list)) {
163163
for (i = 0; i < cluster->nlevels; i++) {
164164
level = &cluster->levels[i];
165165
pwr_params = &level->pwr;

0 commit comments

Comments
 (0)