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>
This commit is contained in:
Heiko Schocher 2014-07-14 09:17:11 +02:00 committed by Anatolij Gustschin
parent 412921d29e
commit 1668d64439

View File

@ -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;
}