Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1867917ybi; Sat, 25 May 2019 10:34:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqySBxTcaBBVeq3kGcI0qD2jftDH1Qwgh4KB4riXvk39LRtKMoPw2c9xNgcWg8LAtiUEJG67 X-Received: by 2002:a63:140c:: with SMTP id u12mr7548111pgl.378.1558805647287; Sat, 25 May 2019 10:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558805647; cv=none; d=google.com; s=arc-20160816; b=ftWw9AReawcrnGABwKXb4qHcl36NqG+gNlCZxgAMt/zF3+GN47Mrzudvha8CfPCOyz d9aX5H0e6QZvbaa6QbqnRmTKjZ18gvFVWGNlhnfuxu3J2T0ghut2RxoXTT+UlcHIxill aEnEgKFJXJkBLe7vKrGD2U7+5FKQpapZ+xGONXLW5aboQ2VyqpB87wkT/cbsmXoId6+m iZldob40vaJOZsuA6NZn/fOY1eMF8rouqK5+LjI7vGRozlkcGm4oRD96dyZgfnqMbo2V MPa5rWTYbimSazQ5lir0NgF9SOuWbtAuFBnCebxOFm++281tUUzxyFF4VcMRTzwR5BfF 58cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=Y05SJz+nKCd/5pTWtJwGNN6+L5QhriQ7JFBupAf8lG8=; b=qj23VcxdwO/cgyrulXIHkycEy40NhPtzdfi7qzsou4lRLvR7AaPCs4A+Hhpq+Y7EbY JIlYZXxFG4/vZlBstgfh+RI3yy9mNnFhbirGf5CgYyZmuz2TVPtrKKLEASihf7xH7ZN5 xfWHzShLAu8mf6zZiLYKAL355uKtE6r+Nqqm2NbR/QdX1SfSXi8HD1MMsOYO7D+Y2Krd Um62+VNr4FByzGdAO7FSpwetUGUS/HSmomkcxoMVwN7bx8+//C5NmyOR6VH+uzt2i7dg GpliSSzzuTSotFpCmP2DmZ6riorPwcMxhVW2q5g8LjrpMkiuKtgxYBUwcl0tjBayqTGD TGmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=etKFg2BX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si9201075plv.102.2019.05.25.10.33.40; Sat, 25 May 2019 10:34:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=etKFg2BX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbfEYRbx (ORCPT + 99 others); Sat, 25 May 2019 13:31:53 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:39341 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbfEYRbw (ORCPT ); Sat, 25 May 2019 13:31:52 -0400 Received: by mail-pl1-f196.google.com with SMTP id g9so5407093plm.6; Sat, 25 May 2019 10:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=Y05SJz+nKCd/5pTWtJwGNN6+L5QhriQ7JFBupAf8lG8=; b=etKFg2BXOQjDNjVMdVNyTRT1PQ2DcRzUcuf6UCFfaRO1EfERfkzGMxIAN/45osz2vP siYKaV2oQxD/oLAnJj3sPkW9yy9U+9WisMKnDm1oaP5znT6v41Zul7TWUQDbh4IWxeOc MYsxY5PYS3uH+D7hsW9xTjLcYg0UgpVB+7+EeJ2KANFIXK9qAxVK7qUzNpEjx0wx5u8Y RkvTqz1DIF1S8YqGVFltn3XGC1bxeAEFyT7HnZWHr/zegsA1tpMWhcgMEh9B/TtBDeRU JRNXZPevsxquCFmXRHHm0Orv/3gUUM0PrMbFPc0W8Y8V+k0cnKtoNEC0RkCuYS+nWLBg g5pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=Y05SJz+nKCd/5pTWtJwGNN6+L5QhriQ7JFBupAf8lG8=; b=Mbus+DJggkgOdlQ453u0XpR5mS0qQ+bz8BLHiKsouy0baHno6ql5JxfLAHFX23UPDA EJks9ZNtgkPUCQXZnii/2gWkMZT9ow55uteBx2/hBzYMEnd2aTqGydq+QG3qWrSYwtoq sBJCXobhVA7ABWEBUVW0I4/ulrcgUxT3BUkIUVxpNt8HRhT5BILH11YQncU6MWy1RPe0 iePbiRGlXpqppa7n5bdxqunq83AzD4DOR3ngGmWDjof/NNFypRJJy1/cFF6VYsVbxHPq +HlbIsUFgoPAbxCGYUbvdzbiaLfbA6zL0M2eI9YyONXB+uDNzD1L4t1ufmkV988yaBTX MZLg== X-Gm-Message-State: APjAAAX3coqxew5TXtkjBZ/6wC6zR0GcJJzo8PGti4y/yJQ8OEas7Cbi d+fQ/PDp3caNanZEMXpx76E= X-Received: by 2002:a17:902:70c7:: with SMTP id l7mr27271071plt.47.1558805512032; Sat, 25 May 2019 10:31:52 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id u6sm6677881pfa.1.2019.05.25.10.31.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 May 2019 10:31:51 -0700 (PDT) Date: Sat, 25 May 2019 23:01:47 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , YueHaibing , Hariprasad Kelam , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: ftdi-elan: fix possible condition with no effect (if == else) Message-ID: <20190525173147.GA20418@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix below warning reported by coccicheck ./drivers/usb/misc/ftdi-elan.c:2026:11-13: WARNING: possible condition with no effect (if == else) Signed-off-by: Hariprasad Kelam --- drivers/usb/misc/ftdi-elan.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 257efac..cdee3af 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c @@ -2023,13 +2023,6 @@ static int ftdi_elan_synchronize(struct usb_ftdi *ftdi) goto read; } else goto reset; - } else if (s1 == 0x31 && s2 == 0x60) { - if (read_stop-- > 0) { - goto read; - } else { - dev_err(&ftdi->udev->dev, "retry limit reached\n"); - continue; - } } else { if (read_stop-- > 0) { goto read; -- 2.7.4