Skip to content

Commit

Permalink
nfc: st-nci: Remove unnecessary variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wengjianfeng authored and David S. Miller committed Feb 8, 2021
1 parent c85b3bb commit 796c901
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/nfc/st-nci/se.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -298,7 +297,7 @@ static int st_nci_hci_apdu_reader_event_received(struct nci_dev *ndev,
}

kfree_skb(skb);
return r;
return 0;
}

/*
Expand Down

0 comments on commit 796c901

Please sign in to comment.