diff mbox series

[v2] nfc: s3fwrn5: remove unnecessary label

Message ID 20210406015954.10988-1-samirweng1979@163.com (mailing list archive)
State Accepted
Commit b58c4649d94eebb1257e0716e4e948dcaa4ae5b5
Delegated to: Netdev Maintainers
Headers show
Series [v2] nfc: s3fwrn5: remove unnecessary label | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 1 maintainers not CCed: krzk@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 29 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

samirweng1979 April 6, 2021, 1:59 a.m. UTC
From: wengjianfeng <wengjianfeng@yulong.com>

In function s3fwrn5_nci_post_setup, the variable ret is assigned then
goto out label, which just return ret, so we use return to replace it.
Other goto sentences are similar, we use return sentences to replace
goto sentences and delete out label.

Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
---
 drivers/nfc/s3fwrn5/core.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Krzysztof Kozlowski April 6, 2021, 7:42 a.m. UTC | #1
On 06/04/2021 03:59, samirweng1979 wrote:
> From: wengjianfeng <wengjianfeng@yulong.com>
> 
> In function s3fwrn5_nci_post_setup, the variable ret is assigned then
> goto out label, which just return ret, so we use return to replace it.
> Other goto sentences are similar, we use return sentences to replace
> goto sentences and delete out label.
> 
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
> ---
>  drivers/nfc/s3fwrn5/core.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)


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


Best regards,
Krzysztof
patchwork-bot+netdevbpf@kernel.org April 6, 2021, 11:30 p.m. UTC | #2
Hello:

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

On Tue,  6 Apr 2021 09:59:54 +0800 you wrote:
> From: wengjianfeng <wengjianfeng@yulong.com>
> 
> In function s3fwrn5_nci_post_setup, the variable ret is assigned then
> goto out label, which just return ret, so we use return to replace it.
> Other goto sentences are similar, we use return sentences to replace
> goto sentences and delete out label.
> 
> [...]

Here is the summary with links:
  - [v2] nfc: s3fwrn5: remove unnecessary label
    https://git.kernel.org/netdev/net-next/c/b58c4649d94e

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

Patch

diff --git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5/core.c
index c00b7a0..865d3e3 100644
--- a/drivers/nfc/s3fwrn5/core.c
+++ b/drivers/nfc/s3fwrn5/core.c
@@ -124,13 +124,12 @@  static int s3fwrn5_nci_post_setup(struct nci_dev *ndev)
 
 	if (s3fwrn5_firmware_init(info)) {
 		//skip bootloader mode
-		ret = 0;
-		goto out;
+		return 0;
 	}
 
 	ret = s3fwrn5_firmware_update(info);
 	if (ret < 0)
-		goto out;
+		return ret;
 
 	/* NCI core reset */
 
@@ -139,12 +138,9 @@  static int s3fwrn5_nci_post_setup(struct nci_dev *ndev)
 
 	ret = nci_core_reset(info->ndev);
 	if (ret < 0)
-		goto out;
-
-	ret = nci_core_init(info->ndev);
+		return ret;
 
-out:
-	return ret;
+	return nci_core_init(info->ndev);
 }
 
 static struct nci_ops s3fwrn5_nci_ops = {