提交 ea9917d6 编写于 作者: I Ilan Elias 提交者: John W. Linville

NFC: Free sk_buff if nfcwilink_send fails

Free sk_buff if nfcwilink_send fails.
Signed-off-by: NIlan Elias <ilane@ti.com>
Acked-by: NSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 1195d89b
......@@ -489,8 +489,10 @@ static int nfcwilink_send(struct sk_buff *skb)
nfc_dev_dbg(&drv->pdev->dev, "send entry, len %d", skb->len);
if (!test_bit(NFCWILINK_RUNNING, &drv->flags))
return -EBUSY;
if (!test_bit(NFCWILINK_RUNNING, &drv->flags)) {
kfree_skb(skb);
return -EINVAL;
}
/* add the ST hdr to the start of the buffer */
hdr.len = cpu_to_le16(skb->len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册