Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thierry Escande and committed by
Samuel Ortiz
e200f008 e073eb67

+3 -5
+3 -5
net/nfc/digital_dep.c
··· 823 823 if (rc) 824 824 goto error; 825 825 826 - return; 826 + goto free_resp; 827 827 } 828 828 829 829 rc = digital_in_send_rtox(ddev, data_exch, resp->data[0]); 830 830 if (rc) 831 831 goto error; 832 832 833 - kfree_skb(resp); 834 - return; 833 + goto free_resp; 835 834 } 836 835 837 836 exit: ··· 1224 1225 1225 1226 ddev->atn_count++; 1226 1227 1227 - kfree_skb(resp); 1228 - return; 1228 + goto free_resp; 1229 1229 } 1230 1230 1231 1231 rc = nfc_tm_data_received(ddev->nfc_dev, resp);