Commit 9446f248 authored by Christophe Ricard's avatar Christophe Ricard Committed by Samuel Ortiz
Browse files

NFC: st21nfcb: Fix "WARNING: invalid free of devm_ allocated data"



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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 1a94cb60
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -297,6 +297,5 @@ void ndlc_remove(struct llt_ndlc *ndlc)
	skb_queue_purge(&ndlc->send_q);

	st21nfcb_nci_remove(ndlc->ndev);
	kfree(ndlc);
}
EXPORT_SYMBOL(ndlc_remove);