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