Commit 9f4feef5 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD

Using list_del_init() instead of list_del() + INIT_LIST_HEAD().
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarStuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4a236d01
......@@ -142,8 +142,7 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device
goto out_unlock;
}
list_del(&resource->node);
INIT_LIST_HEAD(&resource->node);
list_del_init(&resource->node);
res_pool->free_count--;
res_pool->max_count--;
......@@ -220,8 +219,7 @@ int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus,
res_pool->free_count > res_pool->max_count))
goto out_unlock;
list_del(&resource->node);
INIT_LIST_HEAD(&resource->node);
list_del_init(&resource->node);
res_pool->free_count--;
error = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment