Skip to content
Commit 520fe763 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: dwc3: ep0: fix for dead code



commit 6856d30c (usb: dwc3: ep0: return early
on NULL requests) tried to fix a minor corner
case where we could dereference a NULL pointer
but it also ended up introducing some dead code.

Unfortunately, that dead code, if reached, could
end up starving the endpoint request list because
a request would never be given back when it should.

Fix this by moving the check for empty request list
before its first use.

Reported-by: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 206c5f60
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment