thermal: return an error on failure to register thermal class