aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2014-04-24 17:19:35 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2014-05-04 19:04:10 -0400
commit0c942b007b52cdcde285fa1122688f186bf99464 (patch)
treeefa7a8beebc1a60c5605ab2452cb80159677fdf6 /drivers/nfc
parenta3c5d8fb7ffa8850f3d2fc01e1dde0709a3954f9 (diff)
NFC: st21nfca: Free buffer when a bad frame is detected
When a bad frame is detected for a bad crc. We were reallocating and loosing the previous frame pointer. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/st21nfca/i2c.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index b64d8e2e429a..2337737c6cd4 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -476,6 +476,7 @@ static irqreturn_t st21nfca_hci_irq_thread_fn(int irq, void *phy_id)
476 msleep(wait_tab[phy->crc_trials]); 476 msleep(wait_tab[phy->crc_trials]);
477 phy->crc_trials++; 477 phy->crc_trials++;
478 phy->current_read_len = 0; 478 phy->current_read_len = 0;
479 kfree_skb(phy->pending_skb);
479 } else if (r > 0) { 480 } else if (r > 0) {
480 /* 481 /*
481 * We succeeded to read data from the CLF and 482 * We succeeded to read data from the CLF and