2013-10-11 04:40:23

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] mtg: docg3: use free_bch() instead of kfree()

From: Wei Yongjun <[email protected]>

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

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/mtd/devices/docg3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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


2013-10-11 19:18:49

by Robert Jarzmik

[permalink] [raw]
Subject: Re: [PATCH] mtg: docg3: use free_bch() instead of kfree()

Wei Yongjun <[email protected]> writes:

> From: Wei Yongjun <[email protected]>
>
> Use free_bch() instead of kfree() to free init_bch()
> allocated data.
>
> Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Robert Jarzmik <[email protected]>

2013-10-11 21:19:56

by Brian Norris

[permalink] [raw]
Subject: Re: [PATCH] mtg: docg3: use free_bch() instead of kfree()

On Fri, Oct 11, 2013 at 12:40:21PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> Use free_bch() instead of kfree() to free init_bch()
> allocated data.
>
> Signed-off-by: Wei Yongjun <[email protected]>

Pushed to l2-mtd.git. Thanks!

Brian