From: Sergei Shtylyov Date: Fri, 24 Sep 2010 10:44:11 +0000 (+0300) Subject: usb: musb: gadget: kill duplicate code in musb_gadget_queue() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07397021058b7db468b67f8c41ce29ef6331ab92;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Felipe Balbi --- 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, : DMA_FROM_DEVICE); request->mapped = 0; } - } else if (!req->buf) { - return -ENODATA; } else request->mapped = 0;