summaryrefslogtreecommitdiff
path: root/drivers/nfc/st-nci
diff options
context:
space:
mode:
authorwengjianfeng <wengjianfeng@yulong.com>2021-02-08 05:17:32 +0300
committerDavid S. Miller <davem@davemloft.net>2021-02-09 01:56:20 +0300
commit796c9015ab8d41a66e35fb45c61c60676fc7dc41 (patch)
tree826f440c41cf7508fa6232baeac57cc0e9d0def7 /drivers/nfc/st-nci
parentc85b3bb7b650c52365f12eb51c8b42e31828c647 (diff)
downloadlinux-796c9015ab8d41a66e35fb45c61c60676fc7dc41.tar.xz
nfc: st-nci: Remove unnecessary variable
The variable r is defined at the beginning and initialized to 0 until the function returns r, and the variable r is not reassigned.Therefore, we do not need to define the variable r, just return 0 directly at the end of the function. 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/se.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 807eae04c1e3..1cba8f69d3ae 100644
--- a/drivers/nfc/st-nci/se.c
+++ b/drivers/nfc/st-nci/se.c
@@ -276,7 +276,6 @@ static int st_nci_hci_apdu_reader_event_received(struct nci_dev *ndev,
u8 event,
struct sk_buff *skb)
{
- int r = 0;
struct st_nci_info *info = nci_get_drvdata(ndev);
pr_debug("apdu reader gate event: %x\n", event);
@@ -298,7 +297,7 @@ static int st_nci_hci_apdu_reader_event_received(struct nci_dev *ndev,
}
kfree_skb(skb);
- return r;
+ return 0;
}
/*