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 v5.15.86 by commit c4c64d8abd656b9807b63178750fa91454602b86, it was introduced in version v5.10 by commit aea6cb99703e17019e025aa71643b4d3e0a24413. For more details please see the references link.