usb: dwc3: gadget: simplify next_request() return check
authorFelipe Balbi <balbi@ti.com>
Mon, 16 Nov 2015 22:13:57 +0000 (16:13 -0600)
committerFelipe Balbi <balbi@ti.com>
Tue, 15 Dec 2015 15:12:41 +0000 (09:12 -0600)
commitac7bdcc1b3ad042d21bc65e57503d7b41fc69f05
treeae6d12290b8ff18de0b8dbfb19b956a16982d968
parentacc38c4970caac17cd81dc941226ed17fe505d73
usb: dwc3: gadget: simplify next_request() return check

In dwc3_cleanup_done_reqs() we expect that all
iterations of our while (1) loop will find a valid
struct dwc3_request *. In case we don't, we're
dumping a WARN_ON_ONCE() splat so that people report
the failure.

This patch is a simple cleanup converting:

if (!req) {
WARN_ON_ONCE(1);
return 1;
}

to:

if (WARN_ON_ONCE(!req))
return 1;

which is a little easier to read.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c