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: http://review.tizen.org/git/?a=commitdiff_plain;h=1668d64439ecf4af64d5de2e24bb3d7c4e643b25;p=platform%2Fkernel%2Fu-boot.git 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 40b6333..3cb0571 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; }