summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGeyslan G. Bem <geyslan@gmail.com>2015-12-10 17:50:10 -0300
committerFelipe Balbi <balbi@ti.com>2015-12-16 10:07:27 -0600
commitca07099460231576cd7aceed5da47a06cee8063b (patch)
tree0c1da48e4830acf3fa75ea9b63bfc014554292ef /drivers/usb
parent95ca961c758cd9ce789247098b09c39017637e58 (diff)
downloadlinux-ca07099460231576cd7aceed5da47a06cee8063b.tar.bz2
usb: gadget: s3c-hsudc: remove redundant condition
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/udc/s3c-hsudc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index e9def42ce50d..82a9e2a3bedc 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
@@ -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;
}