Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;