usb: gadget: udc: clean up a printk
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 25 Nov 2014 15:55:57 +0000 (18:55 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Jan 2015 18:13:26 +0000 (12:13 -0600)
We already know what "value" is, so there is no need to check.  It
puzzles static checkers to have the unneeded condition.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/bdc/bdc_ep.c

index ff67ceac77c410a8f6a9ab27fc63f63afd9dc01b..ebf82bd050cf47e286f1e50963f1f739c026e1fc 100644 (file)
@@ -881,8 +881,8 @@ static int ep_set_halt(struct bdc_ep *ep, u32 value)
 
                ret = bdc_ep_set_stall(bdc, ep->ep_num);
                if (ret)
-                       dev_err(bdc->dev, "failed to %s STALL on %s\n",
-                               value ? "set" : "clear", ep->name);
+                       dev_err(bdc->dev, "failed to set STALL on %s\n",
+                               ep->name);
                else
                        ep->flags |= BDC_EP_STALL;
        } else {
@@ -890,8 +890,8 @@ static int ep_set_halt(struct bdc_ep *ep, u32 value)
                dev_dbg(bdc->dev, "Before Clear\n");
                ret = bdc_ep_clear_stall(bdc, ep->ep_num);
                if (ret)
-                       dev_err(bdc->dev, "failed to %s STALL on %s\n",
-                               value ? "set" : "clear", ep->name);
+                       dev_err(bdc->dev, "failed to clear STALL on %s\n",
+                               ep->name);
                else
                        ep->flags &= ~BDC_EP_STALL;
                dev_dbg(bdc->dev, "After  Clear\n");