Skip to content

Commit ac9fd3c

Browse files
Yang Yingliangvireshk
authored andcommitted
opp: use list_del_init instead of list_del/INIT_LIST_HEAD
Using list_del_init() instead of list_del() + INIT_LIST_HEAD() to simpify the code. Signed-off-by: Yang Yingliang <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 6efb943 commit ac9fd3c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/opp/of.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,7 @@ static void lazy_link_required_opp_table(struct opp_table *new_table)
433433

434434
/* All required opp-tables found, remove from lazy list */
435435
if (!lazy) {
436-
list_del(&opp_table->lazy);
437-
INIT_LIST_HEAD(&opp_table->lazy);
436+
list_del_init(&opp_table->lazy);
438437

439438
list_for_each_entry(opp, &opp_table->opp_list, node)
440439
_required_opps_available(opp, opp_table->required_opp_count);

0 commit comments

Comments
 (0)