From: Thierry Escande Date: Fri, 8 Jul 2016 13:52:44 +0000 (+0200) Subject: NFC: digital: Free supervisor PDUs X-Git-Tag: v4.14-rc1~2816^2~48^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e200f008ace69eebac0a1432dc9e24ab5cd0d029;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Samuel Ortiz --- diff --git a/net/nfc/digital_dep.c b/net/nfc/digital_dep.c index 03bfc74..ba52a5d 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);