Commit 07397021 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Felipe Balbi

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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 19aab56c
...@@ -1169,8 +1169,6 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, ...@@ -1169,8 +1169,6 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
: DMA_FROM_DEVICE); : DMA_FROM_DEVICE);
request->mapped = 0; request->mapped = 0;
} }
} else if (!req->buf) {
return -ENODATA;
} else } else
request->mapped = 0; request->mapped = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment