tm: fix warning: may be used uninitialized in this function

(cherry picked from commit 76ad065338e6970c09c5ed8bc0f84fd2bfdf0ac2)