Skip to content

Commit

Permalink
usb: musb: gadget: kill duplicate code in musb_gadget_queue()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergei Shtylyov authored and Felipe Balbi committed Nov 8, 2010
1 parent 19aab56 commit 0739702
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/usb/musb/musb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0739702

Please sign in to comment.