UPSTREAM: usb: dwc3: gadget: pass a condition to dev_WARN_ONCE()
authorFelipe Balbi <balbi@ti.com>
Thu, 10 Dec 2015 19:08:20 +0000 (13:08 -0600)
committerWu Liang feng <wulf@rock-chips.com>
Sun, 6 Mar 2016 13:35:26 +0000 (21:35 +0800)
commita1c3fa1060ca430f1033c5f9df75ea487705114c
treefc11b96cf2046e70ad451e4cd3694206835b116a
parent233835c23f9ec4e2ddeb6f85aaa84b087622cf22
UPSTREAM: usb: dwc3: gadget: pass a condition to dev_WARN_ONCE()

instead of using:

if (condition) {
dev_WARN_ONCE(dev, true, "foo");
return -EINVAL;
}

let's use:

if (dev_WARN_ONCE(dev, condition, "foo"))
return -EINVAL;

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 95ca961c758cd9ce789247098b09c39017637e58)

Change-Id: I8a7ee1e00ddf619d23ab974663c11fe795e9a478
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
drivers/usb/dwc3/gadget.c