* [PATCH] nfc: st-nci: remove unnecessary assignment and label
@ 2021-05-24 2:11 samirweng1979
2021-05-24 20:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: samirweng1979 @ 2021-05-24 2:11 UTC (permalink / raw)
To: krzysztof.kozlowski, davem, alex.dewar90
Cc: linux-nfc, netdev, linux-kernel, wengjianfeng
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(-)
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;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfc: st-nci: remove unnecessary assignment and label
2021-05-24 2:11 [PATCH] nfc: st-nci: remove unnecessary assignment and label samirweng1979
@ 2021-05-24 20:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-24 20:20 UTC (permalink / raw)
To: samirweng1979
Cc: krzysztof.kozlowski, davem, alex.dewar90, linux-nfc, netdev,
linux-kernel, wengjianfeng
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-24 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 2:11 [PATCH] nfc: st-nci: remove unnecessary assignment and label samirweng1979
2021-05-24 20:20 ` 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).