提交 ca070994 编写于 作者: G Geyslan G. Bem 提交者: Felipe Balbi

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: NGeyslan G. Bem <geyslan@gmail.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 95ca961c
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册