diff options
author | Heiko Schocher <hs@denx.de> | 2014-07-14 07:17:11 (GMT) |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2014-08-14 13:00:57 (GMT) |
commit | 1668d64439ecf4af64d5de2e24bb3d7c4e643b25 (patch) | |
tree | f2217ab7129ba43cd58fad30af866a3673fb6942 | |
parent | 412921d29e11adcb14bd1d6c5b7145af0dd10599 (diff) | |
download | u-boot-1668d64439ecf4af64d5de2e24bb3d7c4e643b25.tar.xz |
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>
-rw-r--r-- | common/cmd_mtdparts.c | 1 |
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; } |