From: Baokun Li Date: Wed, 9 Jun 2021 07:27:20 +0000 (+0800) Subject: usb: cdns3: cdns3-gadget: Use list_move_tail instead of list_del/list_add_tail X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=33e99b65a13495247b4e35ec97ab82696c0fc6e0;p=linux.git 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 Signed-off-by: Baokun Li Link: https://lore.kernel.org/r/20210609072720.1358527-1-libaokun1@huawei.com Signed-off-by: Peter Chen --- diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c index 21f026c6006d2..2341cf84fe2d6 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; }