summaryrefslogtreecommitdiffstats
path: root/drivers/usb/cdns3/cdns3-gadget.c
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2021-06-09 15:27:20 +0800
committerPeter Chen <peter.chen@kernel.org>2021-06-10 22:16:50 +0800
commit33e99b65a13495247b4e35ec97ab82696c0fc6e0 (patch)
tree6c89e2f3a558fe2644153775555d27a2a6aecbb5 /drivers/usb/cdns3/cdns3-gadget.c
parent3496993d06ffc77dff596bfbed966621e999b2e1 (diff)
downloadlinux-33e99b65a13495247b4e35ec97ab82696c0fc6e0.tar.gz
linux-33e99b65a13495247b4e35ec97ab82696c0fc6e0.tar.bz2
linux-33e99b65a13495247b4e35ec97ab82696c0fc6e0.zip
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>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-gadget.c')
-rw-r--r--drivers/usb/cdns3/cdns3-gadget.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
index 21f026c6006d..2341cf84fe2d 100644
--- a/drivers/usb/cdns3/cdns3-gadget.c
+++ b/drivers/usb/cdns3/cdns3-gadget.c
@@ -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;
}