From: Christophe Ricard Date: Mon, 8 Dec 2014 21:08:08 +0000 (+0100) Subject: NFC: st21nfcb: Fix "WARNING: invalid free of devm_ allocated data" X-Git-Tag: v4.14-rc1~5989^2~108^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9446f248d2f1006f0e5eafe5f828f6ab985f1808;p=platform%2Fkernel%2Flinux-rpi.git 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 Reported-by: Julia Lawall Signed-off-by: Christophe Ricard Signed-off-by: Samuel Ortiz --- diff --git a/drivers/nfc/st21nfcb/ndlc.c b/drivers/nfc/st21nfcb/ndlc.c index bac50e8..ef0f997 100644 --- a/drivers/nfc/st21nfcb/ndlc.c +++ b/drivers/nfc/st21nfcb/ndlc.c @@ -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);