Commit 1668d64439ecf4af64d5de2e24bb3d7c4e643b25

Authored by Heiko Schocher
Committed by Anatolij Gustschin
1 parent 412921d29e

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

common/cmd_mtdparts.c
... ... @@ -292,6 +292,7 @@
292 292 printf("Device %s not found!\n", mtd_dev);
293 293 return 1;
294 294 }
  295 + put_mtd_device(*mtd);
295 296  
296 297 return 0;
297 298 }