regulator: core: fix resource leak in regulator_register()
This is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven. This ID is fixed in Linux Kernel version v6.0.16 by commit 90b713aadc1240bf2dd03d610d6c1d016a9123a2, it was introduced in version v5.10 by commit aea6cb99703e17019e025aa71643b4d3e0a24413. For more details please see the references link.