From patchwork Tue Dec 20 09:56:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 9481331 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 BEC19600CA for ; Tue, 20 Dec 2016 09:57:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C9502838C for ; Tue, 20 Dec 2016 09:57:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91592283E5; Tue, 20 Dec 2016 09:57:50 +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 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 069EB2838C for ; Tue, 20 Dec 2016 09:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934380AbcLTJ5n (ORCPT ); Tue, 20 Dec 2016 04:57:43 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:35314 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933516AbcLTJ5c (ORCPT ); Tue, 20 Dec 2016 04:57:32 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1cJHAo-0000xU-PK; Tue, 20 Dec 2016 09:57:30 +0000 From: Colin King To: Dmitry Torokhov , Nick Dyer , Benjamin Tissoires , linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] input: synaptics-rmi4: check for non zero version logically dead code Date: Tue, 20 Dec 2016 09:56:49 +0000 Message-Id: <20161220095649.7674-1-colin.king@canonical.com> X-Mailer: git-send-email 2.10.2 MIME-Version: 1.0 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 From: Colin Ian King version is a u8, the check for version > 0 means that version can only be zero, so the subsequent check for version != 0 is never true and hence is redudant code and can be removed. Signed-off-by: Colin Ian King Reviewed-by: Benjamin Tissoires --- drivers/input/rmi4/rmi_f34.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c index 9774dfb..c3285ce 100644 --- a/drivers/input/rmi4/rmi_f34.c +++ b/drivers/input/rmi4/rmi_f34.c @@ -441,8 +441,6 @@ static int rmi_f34_probe(struct rmi_function *fn) /* v5 code only supported version 0, try V7 probe */ if (version > 0) return rmi_f34v7_probe(f34); - else if (version != 0) - return -ENODEV; f34->bl_version = 5;