summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-07-14 09:17:11 +0200
committerAnatolij Gustschin <agust@denx.de>2014-08-14 15:00:57 +0200
commit1668d64439ecf4af64d5de2e24bb3d7c4e643b25 (patch)
treef2217ab7129ba43cd58fad30af866a3673fb6942 /common
parent412921d29e11adcb14bd1d6c5b7145af0dd10599 (diff)
downloadu-boot-imx-1668d64439ecf4af64d5de2e24bb3d7c4e643b25.zip
u-boot-imx-1668d64439ecf4af64d5de2e24bb3d7c4e643b25.tar.gz
u-boot-imx-1668d64439ecf4af64d5de2e24bb3d7c4e643b25.tar.bz2
mtdparts: fix usecount bug
add missing put_mtd_device, so mtd->usecount gets correct decremented in get_mtd_info(). Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Scott Wood <scottwood@freescale.com> Cc: Tom Rini <trini@ti.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_mtdparts.c1
1 files changed, 1 insertions, 0 deletions
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;
}