Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;