mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
regulator: of: Fixes to of_regulator_bulk_get_all()
Alexey Charkov <alchark@flipper.net> says: of_regulator_bulk_get_all() only fills in the .consumer part of the struct regulator_bulk_data for the regulators it gets, leaving .supply as garbage, while the rest of the regulator core expects a meaningful name there (e.g. for error prints), causing uninitialized memory access in any failure paths in the core. It also allocates the supplies array and hands it to callers, but never says the callers need to free it (which they don't currently), causing leaks. Fix the former and document the latter in the kerneldoc to help any new users avoid the leak. Link: https://patch.msgid.link/20260930-regulator-get-all-v2-0-ca82070d22f2@flipper.net
This commit is contained in:
commit
5a26d7d96a
1 changed files with 22 additions and 7 deletions
Loading…
Add table
Add a link
Reference in a new issue