diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2010-09-24 06:44:11 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2010-11-08 02:29:55 -0500 |
commit | 07397021058b7db468b67f8c41ce29ef6331ab92 (patch) | |
tree | 0b14d1a15010cfa35abad68161156c19de7d7e6b | |
parent | 19aab56c7f68a577d638a98c019b89420943ee70 (diff) |
usb: musb: gadget: kill duplicate code in musb_gadget_queue()
musb_gadget_queue() checks for '!req->buf' condition twice:
in the second case the code is both duplicated and unreachable
as the first check returns early.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index f37b8594edeb..36cfd060dbe5 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1169,8 +1169,6 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, | |||
1169 | : DMA_FROM_DEVICE); | 1169 | : DMA_FROM_DEVICE); |
1170 | request->mapped = 0; | 1170 | request->mapped = 0; |
1171 | } | 1171 | } |
1172 | } else if (!req->buf) { | ||
1173 | return -ENODATA; | ||
1174 | } else | 1172 | } else |
1175 | request->mapped = 0; | 1173 | request->mapped = 0; |
1176 | 1174 | ||