summaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorThierry Escande <thierry.escande@collabora.com>2016-07-08 15:52:44 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2016-07-11 02:00:26 +0200
commite200f008ace69eebac0a1432dc9e24ab5cd0d029 (patch)
tree4c258033ce19b5815f10eee41c014fcaaab712c8 /net/nfc
parente073eb6797191abe2fe30ca643ab0cc3d8e1e534 (diff)
downloadtalos-obmc-linux-e200f008ace69eebac0a1432dc9e24ab5cd0d029.tar.gz
talos-obmc-linux-e200f008ace69eebac0a1432dc9e24ab5cd0d029.zip
NFC: digital: Free supervisor PDUs
This patch frees the RTOX resp sk_buff in initiator mode. It also makes use of the free_resp exit point for ATN supervisor PDUs in both initiator and target mode. Signed-off-by: Thierry Escande <thierry.escande@collabora.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/digital_dep.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/nfc/digital_dep.c b/net/nfc/digital_dep.c
index 03bfc74745f7..ba52a5dbf3cc 100644
--- a/net/nfc/digital_dep.c
+++ b/net/nfc/digital_dep.c
@@ -823,15 +823,14 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
if (rc)
goto error;
- return;
+ goto free_resp;
}
rc = digital_in_send_rtox(ddev, data_exch, resp->data[0]);
if (rc)
goto error;
- kfree_skb(resp);
- return;
+ goto free_resp;
}
exit:
@@ -1225,8 +1224,7 @@ static void digital_tg_recv_dep_req(struct nfc_digital_dev *ddev, void *arg,
ddev->atn_count++;
- kfree_skb(resp);
- return;
+ goto free_resp;
}
rc = nfc_tm_data_received(ddev->nfc_dev, resp);
OpenPOWER on IntegriCloud