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.2003131731490.19500@cbobk.fhfr.pm>
Date:   Fri, 13 Mar 2020 17:32:14 +0100 (CET)
From:   Jiri Kosina <jikos@...nel.org>
To:     Lucas Tanure <tanure@...ux.com>
cc:     Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] HID: appleir: Remove unnecessary goto label

On Sat, 29 Feb 2020, Lucas Tanure wrote:

> Signed-off-by: Lucas Tanure <tanure@...ux.com>
> ---
>  drivers/hid/hid-appleir.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hid/hid-appleir.c b/drivers/hid/hid-appleir.c
> index bf8d4afe0d6a..aafc285b538f 100644
> --- a/drivers/hid/hid-appleir.c
> +++ b/drivers/hid/hid-appleir.c
> @@ -284,10 +284,8 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id)
>  	struct appleir *appleir;
>  
>  	appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL);
> -	if (!appleir) {
> -		ret = -ENOMEM;
> -		goto allocfail;
> -	}
> +	if (!appleir)
> +		return -ENOMEM;
>  
>  	appleir->hid = hid;
>  
> @@ -314,7 +312,6 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id)
>  	return 0;
>  fail:
>  	kfree(appleir);
> -allocfail:
>  	return ret;
>  }

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ