diff mbox series

nfc: st-nci: remove unnecessary label

Message ID 20210413094530.22076-1-samirweng1979@163.com (mailing list archive)
State Accepted
Commit eba43fac8dfafc07141315e8d7715e317d5cfe95
Delegated to: Netdev Maintainers
Headers show
Series nfc: st-nci: 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 success CCed 2 of 2 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 success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

samirweng1979 April 13, 2021, 9:45 a.m. UTC
From: wengjianfeng <wengjianfeng@yulong.com>

in st_nci_spi_write function, first assign a value to a variable then
goto exit label. return statement just follow the label and exit label
just used once, so we should directly return and remove exit label.

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

Comments

patchwork-bot+netdevbpf@kernel.org April 13, 2021, 10 p.m. UTC | #1
Hello:

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

On Tue, 13 Apr 2021 17:45:30 +0800 you wrote:
> From: wengjianfeng <wengjianfeng@yulong.com>
> 
> in st_nci_spi_write function, first assign a value to a variable then
> goto exit label. return statement just follow the label and exit label
> just used once, so we should directly return and remove exit label.
> 
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
> 
> [...]

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

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/spi.c b/drivers/nfc/st-nci/spi.c
index 8db323a..09df6ea 100644
--- a/drivers/nfc/st-nci/spi.c
+++ b/drivers/nfc/st-nci/spi.c
@@ -95,17 +95,14 @@  static int st_nci_spi_write(void *phy_id, struct sk_buff *skb)
 	 */
 	if (!r) {
 		skb_rx = alloc_skb(skb->len, GFP_KERNEL);
-		if (!skb_rx) {
-			r = -ENOMEM;
-			goto exit;
-		}
+		if (!skb_rx)
+			return -ENOMEM;
 
 		skb_put(skb_rx, skb->len);
 		memcpy(skb_rx->data, buf, skb->len);
 		ndlc_recv(phy->ndlc, skb_rx);
 	}
 
-exit:
 	return r;
 }