浏览代码

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>
Christophe Ricard 11 年之前
父节点
当前提交
0c942b007b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/nfc/st21nfca/i2c.c

+ 1 - 0
drivers/nfc/st21nfca/i2c.c

@@ -476,6 +476,7 @@ static irqreturn_t st21nfca_hci_irq_thread_fn(int irq, void *phy_id)
 		msleep(wait_tab[phy->crc_trials]);
 		phy->crc_trials++;
 		phy->current_read_len = 0;
+		kfree_skb(phy->pending_skb);
 	} else if (r > 0) {
 		/*
 		 * We succeeded to read data from the CLF and