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: <nycvar.YFH.7.76.2011251356520.3441@cbobk.fhfr.pm>
Date:   Wed, 25 Nov 2020 13:57:18 +0100 (CET)
From:   Jiri Kosina <jikos@...nel.org>
To:     Jing Xiangfeng <jingxiangfeng@...wei.com>
cc:     srinivas.pandruvada@...ux.intel.com, benjamin.tissoires@...hat.com,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: intel-ish-hid: Remove unnecessary assignment to
 variable rv

On Tue, 10 Nov 2020, Jing Xiangfeng wrote:

> This assignment to rv is unused in an error path. So remove it.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@...wei.com>
> ---
>  drivers/hid/intel-ish-hid/ishtp-hid.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c
> index b8aae69ad15d..393bed0abee9 100644
> --- a/drivers/hid/intel-ish-hid/ishtp-hid.c
> +++ b/drivers/hid/intel-ish-hid/ishtp-hid.c
> @@ -211,10 +211,8 @@ int ishtp_hid_probe(unsigned int cur_hid_dev,
>  	struct ishtp_hid_data *hid_data;
>  
>  	hid = hid_allocate_device();
> -	if (IS_ERR(hid)) {
> -		rv = PTR_ERR(hid);
> -		return	-ENOMEM;
> -	}
> +	if (IS_ERR(hid))
> +		return PTR_ERR(hid);
>  

Applied, thank you.

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ