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>
This commit is contained in:
Sergei Shtylyov 2010-09-24 13:44:11 +03:00 committed by Felipe Balbi
parent 19aab56c7f
commit 0739702105

View File

@ -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;