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 v6.1.9 by commit 2846a7412f6246fd5171f51011bf76dfebcec0ee, it was introduced in version v6.1.2 by commit e0d8b51bbe84d6a98c162e06344de2d773d9e722. For more details please see the references link.