aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorIlan Elias <ilane@ti.com>2012-01-17 07:11:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:21:56 -0500
commitea9917d6f9e355646258b8d08ac69108908618a2 (patch)
treebf2631676a54dcd09340807a503aae6ebc47fda6 /drivers/nfc
parent1195d89b2defd92829ed54938e60312e62dc8747 (diff)
NFC: Free sk_buff if nfcwilink_send fails
Free sk_buff if nfcwilink_send fails. Signed-off-by: Ilan Elias <ilane@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/nfcwilink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/nfc/nfcwilink.c b/drivers/nfc/nfcwilink.c
index 90af28d611f6..1f74a77d040d 100644
--- a/drivers/nfc/nfcwilink.c
+++ b/drivers/nfc/nfcwilink.c
@@ -489,8 +489,10 @@ static int nfcwilink_send(struct sk_buff *skb)
489 489
490 nfc_dev_dbg(&drv->pdev->dev, "send entry, len %d", skb->len); 490 nfc_dev_dbg(&drv->pdev->dev, "send entry, len %d", skb->len);
491 491
492 if (!test_bit(NFCWILINK_RUNNING, &drv->flags)) 492 if (!test_bit(NFCWILINK_RUNNING, &drv->flags)) {
493 return -EBUSY; 493 kfree_skb(skb);
494 return -EINVAL;
495 }
494 496
495 /* add the ST hdr to the start of the buffer */ 497 /* add the ST hdr to the start of the buffer */
496 hdr.len = cpu_to_le16(skb->len); 498 hdr.len = cpu_to_le16(skb->len);