summaryrefslogtreecommitdiff
path: root/drivers/misc/bcm-vk
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2021-06-09 15:14:30 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-09 14:52:16 +0200
commit20827dddf27d433e45703a4f9bf0a66ab957dd0c (patch)
tree9489383ee40e021c68c726f3e55e33d3f9248210 /drivers/misc/bcm-vk
parent432b6c56075071c5614beb895e4d9ba9fb378d3d (diff)
misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c
Using list_move_tail() instead of list_del() + list_add_tail() in bcm_vk_msg.c. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Baokun Li <libaokun1@huawei.com> Link: https://lore.kernel.org/r/20210609071430.1337400-1-libaokun1@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/bcm-vk')
-rw-r--r--drivers/misc/bcm-vk/bcm_vk_msg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/bcm-vk/bcm_vk_msg.c b/drivers/misc/bcm-vk/bcm_vk_msg.c
index 6efc52b49af6..066b9ef7fcd7 100644
--- a/drivers/misc/bcm-vk/bcm_vk_msg.c
+++ b/drivers/misc/bcm-vk/bcm_vk_msg.c
@@ -354,8 +354,7 @@ static void bcm_vk_drain_all_pend(struct device *dev,
for (num = 0; num < chan->q_nr; num++) {
list_for_each_entry_safe(entry, tmp, &chan->pendq[num], node) {
if ((!ctx) || (entry->ctx->idx == ctx->idx)) {
- list_del(&entry->node);
- list_add_tail(&entry->node, &del_q);
+ list_move_tail(&entry->node, &del_q);
}
}
}