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

Commit 43467868 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Greg Kroah-Hartman
Browse files

usb: musb: gadget: kill unreachable code in musb_g_rx()



musb_g_rx() always returns if next_request() call yields NULL, so the DBG()
near the function's end can never be invoked. Remove it along with unneeded
'return'; also remove the duplicate 'request' check...

Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2f8d5cd6
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -775,7 +775,7 @@ void musb_g_rx(struct musb *musb, u8 epnum)
		musb_writew(epio, MUSB_RXCSR, csr);

		DBG(3, "%s iso overrun on %p\n", musb_ep->name, request);
		if (request && request->status == -EINPROGRESS)
		if (request->status == -EINPROGRESS)
			request->status = -EOVERFLOW;
	}
	if (csr & MUSB_RXCSR_INCOMPRX) {
@@ -828,14 +828,8 @@ void musb_g_rx(struct musb *musb, u8 epnum)
			return;
	}

	/* analyze request if the ep is hot */
	if (request)
	/* Analyze request */
	rxstate(musb, to_musb_request(request));
	else
		DBG(3, "packet waiting for %s%s request\n",
				musb_ep->desc ? "" : "inactive ",
				musb_ep->end_point.name);
	return;
}

/* ------------------------------------------------------------ */