All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: christophe.ricard@gmail.com
Cc: Christophe Ricard <christophe.ricard@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: re: NFC: st21nfca: Rework st21nfca_hci_event_received to route event to relevent gate.
Date: Sat, 6 Dec 2014 23:16:13 +0300	[thread overview]
Message-ID: <20141206201613.GA28810@mwanda> (raw)

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

                 reply	other threads:[~2014-12-06 20:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141206201613.GA28810@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=christophe.ricard@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.