public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtg: docg3: use free_bch() instead of kfree()
@ 2013-10-11  4:40 Wei Yongjun
  2013-10-11 19:17 ` Robert Jarzmik
  2013-10-11 21:19 ` Brian Norris
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2013-10-11  4:40 UTC (permalink / raw)
  To: dwmw2, artem.bityutskiy, jg1.han, dan.carpenter, robert.jarzmik
  Cc: yongjun_wei, linux-mtd, linux-kernel

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(-)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-11 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11  4:40 [PATCH] mtg: docg3: use free_bch() instead of kfree() Wei Yongjun
2013-10-11 19:17 ` Robert Jarzmik
2013-10-11 21:19 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox