[PATCH 5.15 093/204] thermal: core: call put_device() only after device_register() fails