netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfc: fdp: remove unnecessary labels
@ 2021-06-10  2:46 samirweng1979
  2021-06-10  6:36 ` Krzysztof Kozlowski
  2021-06-11 20:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: samirweng1979 @ 2021-06-10  2:46 UTC (permalink / raw)
  To: krzysztof.kozlowski, davem, kuba, unixbhaskar
  Cc: netdev, linux-kernel, wengjianfeng

From: wengjianfeng <wengjianfeng@yulong.com>

Some labels are meaningless, so we delete them and use the
return statement instead of the goto statement.

Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
---
 drivers/nfc/fdp/fdp.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

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)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nfc: fdp: remove unnecessary labels
  2021-06-10  2:46 [PATCH] nfc: fdp: remove unnecessary labels samirweng1979
@ 2021-06-10  6:36 ` Krzysztof Kozlowski
  2021-06-11 20:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-06-10  6:36 UTC (permalink / raw)
  To: samirweng1979, davem, kuba, unixbhaskar
  Cc: netdev, linux-kernel, wengjianfeng

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

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.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)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nfc: fdp: remove unnecessary labels
  2021-06-10  2:46 [PATCH] nfc: fdp: remove unnecessary labels samirweng1979
  2021-06-10  6:36 ` Krzysztof Kozlowski
@ 2021-06-11 20:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-11 20:00 UTC (permalink / raw)
  To: samirweng1979
  Cc: krzysztof.kozlowski, davem, kuba, unixbhaskar, netdev,
	linux-kernel, wengjianfeng

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 10 Jun 2021 10:46:16 +0800 you wrote:
> From: wengjianfeng <wengjianfeng@yulong.com>
> 
> Some labels are meaningless, so we delete them and use the
> return statement instead of the goto statement.
> 
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
> 
> [...]

Here is the summary with links:
  - nfc: fdp: remove unnecessary labels
    https://git.kernel.org/netdev/net-next/c/43fa32d1cc1b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-11 20:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  2:46 [PATCH] nfc: fdp: remove unnecessary labels samirweng1979
2021-06-10  6:36 ` Krzysztof Kozlowski
2021-06-11 20:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).