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] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4dd4569-2f81-7aac-e8f7-405866bb1b7d@canonical.com>
Date:   Thu, 10 Jun 2021 08:36:42 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To:     samirweng1979 <samirweng1979@....com>, davem@...emloft.net,
        kuba@...nel.org, unixbhaskar@...il.com
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        wengjianfeng <wengjianfeng@...ong.com>
Subject: Re: [PATCH] nfc: fdp: remove unnecessary labels

On 10/06/2021 04:46, samirweng1979 wrote:
> From: wengjianfeng <wengjianfeng@...ong.com>
> 
> Some labels are meaningless, so we delete them and use the
> return statement instead of the goto statement.
> 
> Signed-off-by: wengjianfeng <wengjianfeng@...ong.com>
> ---
>  drivers/nfc/fdp/fdp.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>

Best regards,
Krzysztof

> diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c
> index 7863b25..5287458 100644
> --- a/drivers/nfc/fdp/fdp.c
> +++ b/drivers/nfc/fdp/fdp.c
> @@ -266,7 +266,7 @@ static int fdp_nci_request_firmware(struct nci_dev *ndev)
>  	r = request_firmware(&info->ram_patch, FDP_RAM_PATCH_NAME, dev);
>  	if (r < 0) {
>  		nfc_err(dev, "RAM patch request error\n");
> -		goto error;
> +		return r;
>  	}
>  
>  	data = (u8 *) info->ram_patch->data;
> @@ -283,7 +283,7 @@ static int fdp_nci_request_firmware(struct nci_dev *ndev)
>  	r = request_firmware(&info->otp_patch, FDP_OTP_PATCH_NAME, dev);
>  	if (r < 0) {
>  		nfc_err(dev, "OTP patch request error\n");
> -		goto out;
> +		return 0;
>  	}
>  
>  	data = (u8 *) info->otp_patch->data;
> @@ -295,10 +295,7 @@ static int fdp_nci_request_firmware(struct nci_dev *ndev)
>  
>  	dev_dbg(dev, "OTP patch version: %d, size: %d\n",
>  		 info->otp_patch_version, (int) info->otp_patch->size);
> -out:
>  	return 0;
> -error:
> -	return r;
>  }
>  
>  static void fdp_nci_release_firmware(struct nci_dev *ndev)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ