From 1668d64439ecf4af64d5de2e24bb3d7c4e643b25 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 14 Jul 2014 09:17:11 +0200 Subject: [PATCH] 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 --- common/cmd_mtdparts.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.39.5