diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-12-16 12:38:31 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-23 14:34:12 -0500 |
commit | 95962a773ca5c1e52305fd1003d3bda59abbf371 (patch) | |
tree | 02f1586201f90f359f74f26b2bdccf51ca77fb9e | |
parent | 4e092d110fe931db3878865db185be1c9df3e182 (diff) |
USB: musb_gadget: fix kernel oops in txstate()
Commit 7723de7e19b744144975a09c81777ec0f14ac5b3 (USB: musb_gadget: remove
pointless loop) included uncalled for (and incorrect) optimization that
might cause a kernel oops in txstate() -- undo it.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index c49b9ba025ab..4dea14609252 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -515,12 +515,12 @@ void musb_g_tx(struct musb *musb, u8 epnum) | |||
515 | if (csr & MUSB_TXCSR_FIFONOTEMPTY) | 515 | if (csr & MUSB_TXCSR_FIFONOTEMPTY) |
516 | return; | 516 | return; |
517 | 517 | ||
518 | if (!musb_ep->desc) { | 518 | request = musb_ep->desc ? next_request(musb_ep) : NULL; |
519 | if (!request) { | ||
519 | DBG(4, "%s idle now\n", | 520 | DBG(4, "%s idle now\n", |
520 | musb_ep->end_point.name); | 521 | musb_ep->end_point.name); |
521 | return; | 522 | return; |
522 | } else | 523 | } |
523 | request = next_request(musb_ep); | ||
524 | } | 524 | } |
525 | 525 | ||
526 | txstate(musb, to_musb_request(request)); | 526 | txstate(musb, to_musb_request(request)); |