ndlc pointer got allocated with devm_kzalloc in ndlc_probe function.
This gives this error message:
drivers/nfc/st21nfcb/ndlc.c:296:1-6: WARNING: invalid free of devm_ allocated data.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
skb_queue_purge(&ndlc->send_q);
st21nfcb_nci_remove(ndlc->ndev);
- kfree(ndlc);
}
EXPORT_SYMBOL(ndlc_remove);