mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
staging: emxx_udc: fix loop in _nbu2ss_nuke()
[ Upstream commite0112a7c9e
] The _nbu2ss_ep_done() function calls: list_del_init(&req->queue); which means that the loop will never exit. Fixes:ca3d253eb9
("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>
This commit is contained in:
parent
0bf49b3c8d
commit
3ee1d6e231
1 changed files with 2 additions and 2 deletions
|
@ -2064,7 +2064,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);
|
||||
|
@ -2076,7 +2076,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue