mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-10 05:42:56 +01:00
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:
parent
412921d29e
commit
1668d64439
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue