[PATCH 1/2] env: mtd: add the missing put_mtd_device()

Tom Rini trini at konsulko.com
Sat Aug 2 15:41:25 CEST 2025


On Fri, 25 Jul 2025 08:20:44 +0800, Shiji Yang wrote:

> The mtd device is got in setup_mtd_device(), we must put the mtd
> device before exiting the function to update the mtd use count.
> This patch fixes the following env error:
> 
> > Removing MTD device #2 (u-boot-env) with use count 1
> > Error when deleting partition "u-boot-env" (-16)
> 
> [...]

Applied to u-boot/master, thanks!

[1/2] env: mtd: add the missing put_mtd_device()
      commit: 39ae954b04ef2fc4a8c14410379b663deb391fde
[2/2] env: mtd: initialize saved_buf pointer
      commit: 7e842bd33154946052068195df3446635236d3d9
-- 
Tom




More information about the U-Boot mailing list