Skip to content

Commit

Permalink
mtg: docg3: use free_bch() instead of kfree()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Wei Yongjun authored and Brian Norris committed Nov 7, 2013
1 parent 9fee840 commit 39ac9ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/devices/docg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,7 @@ static int __init docg3_probe(struct platform_device *pdev)
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]);
Expand Down

0 comments on commit 39ac9ca

Please sign in to comment.