thermal: core: call putdevice() only after deviceregister() fails
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.91 by commit a7d736cc3c6cb0d7498bbfb56515d414e35e9510, it was introduced in version v5.15.86 by commit 5139cbc0c6e4bf2fcffc9a7ed4350bf6985bc561. For more details please see the references link.