Skip to content

Commit

Permalink
staging: emxx_udc: fix loop in _nbu2ss_nuke()
Browse files Browse the repository at this point in the history
[ Upstream commit e0112a7 ]

The _nbu2ss_ep_done() function calls:

	list_del_init(&req->queue);

which means that the loop will never exit.

Fixes: ca3d253 ("Staging: emxx_udc: Iterate list using list_for_each_entry")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YKUd0sDyjm/lkJfJ@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Jun 3, 2021
1 parent 285207a commit cbb1cf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/emxx_udc/emxx_udc.c
Expand Up @@ -2065,7 +2065,7 @@ static int _nbu2ss_nuke(struct nbu2ss_udc *udc,
struct nbu2ss_ep *ep,
int status)
{
struct nbu2ss_req *req;
struct nbu2ss_req *req, *n;

/* Endpoint Disable */
_nbu2ss_epn_exit(udc, ep);
Expand All @@ -2077,7 +2077,7 @@ static int _nbu2ss_nuke(struct nbu2ss_udc *udc,
return 0;

/* called with irqs blocked */
list_for_each_entry(req, &ep->queue, queue) {
list_for_each_entry_safe(req, n, &ep->queue, queue) {
_nbu2ss_ep_done(ep, req, status);
}

Expand Down

0 comments on commit cbb1cf6

Please sign in to comment.