From: Heiko Schocher Date: Mon, 14 Jul 2014 07:17:11 +0000 (+0200) Subject: mtdparts: fix usecount bug X-Git-Tag: v2014.10-rc2~82^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1668d64439ecf4af64d5de2e24bb3d7c4e643b25;p=u-boot mtdparts: fix usecount bug add missing put_mtd_device, so mtd->usecount gets correct decremented in get_mtd_info(). Signed-off-by: Heiko Schocher Cc: Scott Wood Cc: Tom Rini --- diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c index 40b6333ebf..3cb0571df3 100644 --- a/common/cmd_mtdparts.c +++ b/common/cmd_mtdparts.c @@ -292,6 +292,7 @@ static int get_mtd_info(u8 type, u8 num, struct mtd_info **mtd) printf("Device %s not found!\n", mtd_dev); return 1; } + put_mtd_device(*mtd); return 0; }