* re: NFC: st21nfca: Rework st21nfca_hci_event_received to route event to relevent gate.
@ 2014-12-06 20:16 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-12-06 20:16 UTC (permalink / raw)
To: christophe.ricard; +Cc: Christophe Ricard, linux-wireless
Hello Christophe Ricard,
The patch a4415e761404: "NFC: st21nfca: Rework
st21nfca_hci_event_received to route event to relevent gate." from
Nov 13, 2014, leads to the following static checker warning:
drivers/nfc/st21nfca/st21nfca.c:848 st21nfca_hci_event_received()
info: ignoring unreachable code.
drivers/nfc/st21nfca/st21nfca.c
832 /*
833 * Returns:
834 * <= 0: driver handled the event, skb consumed
835 * 1: driver does not handle the event, please do standard processing
836 */
837 static int st21nfca_hci_event_received(struct nfc_hci_dev *hdev, u8 gate,
838 u8 event, struct sk_buff *skb)
839 {
840 pr_debug("hci event: %d gate: %x\n", event, gate);
841
842 switch (gate) {
843 case ST21NFCA_RF_CARD_F_GATE:
844 return st21nfca_dep_event_received(hdev, event, skb);
845 default:
846 return 1;
847 }
848 kfree_skb(skb);
^^^^^^^^^^^^^^
Not reached. Confusing.
849 return 0;
850 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-06 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-06 20:16 NFC: st21nfca: Rework st21nfca_hci_event_received to route event to relevent gate Dan Carpenter
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).