]> Git Repo - linux.git/commitdiff
usb: cdns3: cdns3-gadget: Use list_move_tail instead of list_del/list_add_tail
authorBaokun Li <[email protected]>
Wed, 9 Jun 2021 07:27:20 +0000 (15:27 +0800)
committerPeter Chen <[email protected]>
Thu, 10 Jun 2021 14:16:50 +0000 (22:16 +0800)
Using list_move_tail() instead of list_del() + list_add_tail().

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Baokun Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Chen <[email protected]>
drivers/usb/cdns3/cdns3-gadget.c

index 21f026c6006d232284311aedc5d6cb593ad9e465..2341cf84fe2d66dded5831dce9539916c0196a41 100644 (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;
        }
This page took 0.047658 seconds and 4 git commands to generate.