drivers: cpuidle: lpm-levels: Correct missing list initialize

INIT_LIST_HEAD must be done to the list before do
list_del to it.

Change-Id: I25a160b326b03196058a06d452e972b409643910
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
This commit is contained in:
Maria Yu 2017-09-15 00:04:32 +08:00 committed by Gerrit - the friendly Code Review server
parent 9c978aa85f
commit d9078b0793

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2019,2021, The Linux Foundation. All rights reserved.
*/
#define pr_fmt(fmt) "%s: " fmt, KBUILD_MODNAME
@ -638,6 +638,7 @@ struct lpm_cluster *parse_cluster(struct device_node *node,
if (ret)
return NULL;
INIT_LIST_HEAD(&c->list);
INIT_LIST_HEAD(&c->child);
INIT_LIST_HEAD(&c->cpu);
c->parent = parent;