Patchwork mtg: docg3: use free_bch() instead of kfree()

login
register
mail settings
Submitter Wei Yongjun
Date Oct. 11, 2013, 4:40 a.m.
Message ID <CAPgLHd_vT4cJ1F1a6TDzYb2LFSb-me90K58K22Z=ae3VsOfbng@mail.gmail.com>
Download mbox | patch
Permalink /patch/282524/
State New
Headers show

Comments

Wei Yongjun - Oct. 11, 2013, 4:40 a.m.
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use free_bch() instead of kfree() to free init_bch()
allocated data.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/mtd/devices/docg3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Robert Jarzmik - Oct. 11, 2013, 7:17 p.m.
Wei Yongjun <weiyj.lk@gmail.com> writes:

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Use free_bch() instead of kfree() to free init_bch()
> allocated data.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Brian Norris - Oct. 11, 2013, 9:19 p.m.
On Fri, Oct 11, 2013 at 12:40:21PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Use free_bch() instead of kfree() to free init_bch()
> allocated data.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Pushed to l2-mtd.git. Thanks!

Brian

Patch

diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 3e1b0a0..4f091c1 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -2097,7 +2097,7 @@  notfound:
 	ret = -ENODEV;
 	dev_info(dev, "No supported DiskOnChip found\n");
 err_probe:
-	kfree(cascade->bch);
+	free_bch(cascade->bch);
 	for (floor = 0; floor < DOC_MAX_NBFLOORS; floor++)
 		if (cascade->floors[floor])
 			doc_release_device(cascade->floors[floor]);