From patchwork Thu Aug 4 05:28:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 9262703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5E6276048F for ; Thu, 4 Aug 2016 05:29:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E0F72818A for ; Thu, 4 Aug 2016 05:29:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41690281DB; Thu, 4 Aug 2016 05:29:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C99602818A for ; Thu, 4 Aug 2016 05:29:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932722AbcHDF3R (ORCPT ); Thu, 4 Aug 2016 01:29:17 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:36571 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932613AbcHDF3Q (ORCPT ); Thu, 4 Aug 2016 01:29:16 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u745T85F004020 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Aug 2016 05:29:08 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u745T8xk023606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Aug 2016 05:29:08 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u745T7mo019227; Thu, 4 Aug 2016 05:29:07 GMT Received: from mwanda (/154.0.139.178) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 03 Aug 2016 22:29:06 -0700 Date: Thu, 4 Aug 2016 08:28:59 +0300 From: Dan Carpenter To: Dmitry Torokhov , Robert Dolca Cc: Henrik Rydberg , Hans de Goede , Daniel Jansen , linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] Input: silead - remove some dead code Message-ID: <20160804052859.GI775@mwanda> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP buf[0] is an unsigned char. touch_nr is an int. The test for negative here doesn't make sense so I have removed it. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c index 5f55167..7379fe1 100644 --- a/drivers/input/touchscreen/silead.c +++ b/drivers/input/touchscreen/silead.c @@ -147,9 +147,6 @@ static void silead_ts_read_data(struct i2c_client *client) } touch_nr = buf[0]; - if (touch_nr < 0) - return; - if (touch_nr > data->max_fingers) { dev_warn(dev, "More touches reported then supported %d > %d\n", touch_nr, data->max_fingers);