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: Dan Carpenter <[email protected]>
Reported-by: Julia Lawall <[email protected]>
Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
Christophe Ricard 2014-12-08 22:08:08 +01:00 • committed by Samuel Ortiz
commit 9446f248d2

View file

@ -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);