Commit ca070994 authored by Geyslan G. Bem's avatar Geyslan G. Bem Committed by Felipe Balbi
Browse files

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: default avatarGeyslan G. Bem <geyslan@gmail.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 95ca961c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -569,7 +569,7 @@ static int s3c_hsudc_handle_reqfeat(struct s3c_hsudc *hsudc,
		hsep = &hsudc->ep[ep_num];
		hsep = &hsudc->ep[ep_num];
		switch (le16_to_cpu(ctrl->wValue)) {
		switch (le16_to_cpu(ctrl->wValue)) {
		case USB_ENDPOINT_HALT:
		case USB_ENDPOINT_HALT:
			if (set || (!set && !hsep->wedge))
			if (set || !hsep->wedge)
				s3c_hsudc_set_halt(&hsep->ep, set);
				s3c_hsudc_set_halt(&hsep->ep, set);
			return 0;
			return 0;
		}
		}