2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 06:04:14 +08:00

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: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Wei Yongjun 2016-09-15 02:27:04 +00:00 committed by Greg Kroah-Hartman
parent 4a236d01b5
commit 9f4feef54d

View File

@ -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;