From: Wei Yongjun Date: Fri, 11 Oct 2013 04:40:21 +0000 (+0800) Subject: mtg: docg3: use free_bch() instead of kfree() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=39ac9ca336314b39df1488087c05a8214266869c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mtg: docg3: use free_bch() instead of kfree() Use free_bch() instead of kfree() to free init_bch() allocated data. Signed-off-by: Wei Yongjun Acked-by: Robert Jarzmik Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c index 3e1b0a0ef4db..4f091c1a9981 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]);