diff options
author | wengjianfeng <wengjianfeng@yulong.com> | 2021-04-13 17:45:30 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-13 14:50:57 -0700 |
commit | eba43fac8dfafc07141315e8d7715e317d5cfe95 (patch) | |
tree | bf101406db903668f868e2b80e01e51280767c16 /drivers/nfc/st-nci | |
parent | 334c4241472916851d97aae209aedf1927ec84e3 (diff) | |
download | linux-eba43fac8dfafc07141315e8d7715e317d5cfe95.tar.gz linux-eba43fac8dfafc07141315e8d7715e317d5cfe95.tar.bz2 linux-eba43fac8dfafc07141315e8d7715e317d5cfe95.zip |
nfc: st-nci: remove unnecessary label
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc/st-nci')
-rw-r--r-- | drivers/nfc/st-nci/spi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/nfc/st-nci/spi.c b/drivers/nfc/st-nci/spi.c index 8db323adebf0..09df6ea65840 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; } |