usb: gadget: s3c-hsudc: remove redundant condition
authorGeyslan G. Bem <geyslan@gmail.com>
Thu, 10 Dec 2015 20:50:10 +0000 (17:50 -0300)
committerFelipe Balbi <balbi@ti.com>
Wed, 16 Dec 2015 16:07:27 +0000 (10:07 -0600)
This patch removes redundant condition.

 (!A || (A && B)) is the same as (!A || B).

Tested by compilation only.
Caught by cppcheck.

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/s3c-hsudc.c

index e9def42ce50d735eaafb9a39abb0b8f497392402..82a9e2a3bedc2afdbde1612bd2a79b703fd10532 100644 (file)
@@ -569,7 +569,7 @@ static int s3c_hsudc_handle_reqfeat(struct s3c_hsudc *hsudc,
                hsep = &hsudc->ep[ep_num];
                switch (le16_to_cpu(ctrl->wValue)) {
                case USB_ENDPOINT_HALT:
-                       if (set || (!set && !hsep->wedge))
+                       if (set || !hsep->wedge)
                                s3c_hsudc_set_halt(&hsep->ep, set);
                        return 0;
                }
This page took 0.031909 seconds and 5 git commands to generate.