Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752842AbbLJUup (ORCPT ); Thu, 10 Dec 2015 15:50:45 -0500 Received: from mail-qg0-f47.google.com ([209.85.192.47]:36578 "EHLO mail-qg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752595AbbLJUun (ORCPT ); Thu, 10 Dec 2015 15:50:43 -0500 From: "Geyslan G. Bem" To: peter.senna@gmail.com Cc: "Geyslan G. Bem" , Felipe Balbi , Greg Kroah-Hartman , Robert Baldyga , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] usb: gadget: remove redundant condition Date: Thu, 10 Dec 2015 17:50:10 -0300 Message-Id: <1449780614-5933-2-git-send-email-geyslan@gmail.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1449780614-5933-1-git-send-email-geyslan@gmail.com> References: <1449780614-5933-1-git-send-email-geyslan@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1039 Lines: 33 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 --- drivers/usb/gadget/udc/s3c-hsudc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c index e9def42..82a9e2a 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; } -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/