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
|
@ -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…
Reference in New Issue