[PATCH] Staging: crystalhd: use vfree() instead of kfree()

Wei Yongjun weiyj.lk at gmail.com
Fri Oct 11 04:39:28 UTC 2013


From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>

Use vfree() instead of kfree() to free vmalloc()
allocated data.

Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
---
 drivers/staging/crystalhd/crystalhd_lnx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
index b17fbf8..e0c28ed 100644
--- a/drivers/staging/crystalhd/crystalhd_lnx.c
+++ b/drivers/staging/crystalhd/crystalhd_lnx.c
@@ -156,7 +156,7 @@ static int chd_dec_fetch_cdata(struct crystalhd_adp *adp,
 	if (rc) {
 		BCMLOG_ERR("failed to pull add_cdata sz:%x ua_off:%x\n",
 			   io->add_cdata_sz, (unsigned int)ua_off);
-		kfree(io->add_cdata);
+		vfree(io->add_cdata);
 		io->add_cdata = NULL;
 		return -ENODATA;
 	}



More information about the devel mailing list