lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170102090308.GB5767@mail.corp.redhat.com>
Date:   Mon, 2 Jan 2017 10:03:08 +0100
From:   Benjamin Tissoires <benjamin.tissoires@...hat.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Nick Dyer <nick@...anahar.org>, linux-input@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] input: synaptics-rmi4: check for non zero version
 logically dead code

On Dec 20 2016 or thereabouts, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> 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 <colin.king@...onical.com>
> ---

Works for me:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>

>  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;
>  
> -- 
> 2.10.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ