mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
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 |
||
|---|---|---|
| .. | ||
| arm | ||
| coldfire | ||
| hosted | ||
| mips | ||