diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2014-05-20 16:21:54 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-07-22 19:04:30 -0400 |
commit | cf577344e2ece0798046402fd88472473c6e7ee8 (patch) | |
tree | 2c758b823974e9d019d41e2fea3b15bf184840ed | |
parent | fb92ff78f85b6c1a6f1277f7dd04a3762ba725ef (diff) |
NFC: st21nfca: Free buffer in case no data are retrieved.
In case no data are retrieve through i2c or one specific case is not handled.
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/nfc/st21nfca/i2c.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c index 3f954ed86d98..d10d837fb888 100644 --- a/drivers/nfc/st21nfca/i2c.c +++ b/drivers/nfc/st21nfca/i2c.c | |||
@@ -487,6 +487,8 @@ static irqreturn_t st21nfca_hci_irq_thread_fn(int irq, void *phy_id) | |||
487 | */ | 487 | */ |
488 | nfc_hci_recv_frame(phy->hdev, phy->pending_skb); | 488 | nfc_hci_recv_frame(phy->hdev, phy->pending_skb); |
489 | phy->crc_trials = 0; | 489 | phy->crc_trials = 0; |
490 | } else { | ||
491 | kfree_skb(phy->pending_skb); | ||
490 | } | 492 | } |
491 | 493 | ||
492 | phy->pending_skb = alloc_skb(ST21NFCA_HCI_LLC_MAX_SIZE * 2, GFP_KERNEL); | 494 | phy->pending_skb = alloc_skb(ST21NFCA_HCI_LLC_MAX_SIZE * 2, GFP_KERNEL); |