usb: cdns3: cdns3-gadget: Use list_move_tail instead of list_del/list_add_tail

Using list_move_tail() instead of list_del() + list_add_tail().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Link: https://lore.kernel.org/r/20210609072720.1358527-1-libaokun1@huawei.com
Signed-off-by: Peter Chen <peter.chen@kernel.org>
This commit is contained in:
Baokun Li 2021-06-09 15:27:20 +08:00 committed by Peter Chen
parent 3496993d06
commit 33e99b65a1
No known key found for this signature in database
GPG Key ID: 4859298150D671BB
1 changed files with 1 additions and 3 deletions

View File

@ -430,9 +430,7 @@ static int cdns3_start_all_request(struct cdns3_device *priv_dev,
if (ret)
return ret;
list_del(&request->list);
list_add_tail(&request->list,
&priv_ep->pending_req_list);
list_move_tail(&request->list, &priv_ep->pending_req_list);
if (request->stream_id != 0 || (priv_ep->flags & EP_TDLCHK_EN))
break;
}