rockbox/firmware/target
Michael McAllister 233ea05ea2 x1000: set the NAND driver's init guard so setup runs once
nand_init() guards its one-time setup with a static `inited` flag that
nothing ever assigns, so every call re-runs the initialiser. That resets
refcount to 0 on a driver another caller may already hold open, and the next nand_close() then decrements from zero and tears the driver down underneath its user.

Assign the flag, and fix the caller that reaches this. On a failed open the installer's updater_cleanup() would call nand_close() against a driver nand_open() never took a reference on, because nand_open() only takes one once it has identified the chip; release the lock and drop the pointer instead.

Change-Id: I88d54ac5bca9bcebb62fd9c6f50f1acf982a9a3b
Co-Authored-By: Claude Opus 4.8
2026-08-10 15:26:23 -04:00
..
arm ipod6g: Add inline earphone remote support 2026-08-05 08:40:24 -04:00
coldfire chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
hosted hiby: usb dac: fix crackling sound due to sample rate mismatch 2026-08-05 19:27:41 -04:00
mips x1000: set the NAND driver's init guard so setup runs once 2026-08-10 15:26:23 -04:00