diff mbox series

nfc: st-nci: remove unnecessary assignment and label

Message ID 20210524021123.8860-1-samirweng1979@163.com (mailing list archive)
State Accepted
Commit 62f148d8dde6239199af49e52ae43d0820765a65
Delegated to: Netdev Maintainers
Headers show
Series nfc: st-nci: remove unnecessary assignment and 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 success CCed 4 of 4 maintainers
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 warning CHECK: Comparison to NULL could be written "!dest_params"
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

samirweng1979 May 24, 2021, 2:11 a.m. UTC
From: wengjianfeng <wengjianfeng@yulong.com>

In function st_nci_hci_network_init, the variable r is assigned then
goto exit label, which just return r, so we use return to replace it.
and exit label only used once at here, so we remove exit label.

Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
---
 drivers/nfc/st-nci/se.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 24, 2021, 8:20 p.m. UTC | #1
Hello:

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

On Mon, 24 May 2021 10:11:23 +0800 you wrote:
> From: wengjianfeng <wengjianfeng@yulong.com>
> 
> In function st_nci_hci_network_init, the variable r is assigned then
> goto exit label, which just return r, so we use return to replace it.
> and exit label only used once at here, so we remove exit label.
> 
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
> 
> [...]

Here is the summary with links:
  - nfc: st-nci: remove unnecessary assignment and label
    https://git.kernel.org/netdev/net-next/c/62f148d8dde6

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/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 1cba8f6..8657e02 100644
--- a/drivers/nfc/st-nci/se.c
+++ b/drivers/nfc/st-nci/se.c
@@ -534,10 +534,8 @@  static int st_nci_hci_network_init(struct nci_dev *ndev)
 	dest_params =
 		kzalloc(sizeof(struct core_conn_create_dest_spec_params) +
 			sizeof(struct dest_spec_params), GFP_KERNEL);
-	if (dest_params == NULL) {
-		r = -ENOMEM;
-		goto exit;
-	}
+	if (dest_params == NULL)
+		return -ENOMEM;
 
 	dest_params->type = NCI_DESTINATION_SPECIFIC_PARAM_NFCEE_TYPE;
 	dest_params->length = sizeof(struct dest_spec_params);
@@ -594,8 +592,6 @@  static int st_nci_hci_network_init(struct nci_dev *ndev)
 
 free_dest_params:
 	kfree(dest_params);
-
-exit:
 	return r;
 }