This question can be based on either the 2011 film of "Tinker Tailor Soldier Spy" with Gary Oldman, or the 1979 BBC series with Alec Guinness.
How did Smiley know he could trust Toby Esterhase?
There is a pivotal scene near the end when Smiley confronts Esterhase. Smiley is able to convince Esterhase that there is a mole and that Witchcraft is a sham, and Esterhase tells Smiley the address of the London safe house. This is the key piece Smiley needs to lay the trap that eventually unmasks the mole.
But Esterhase was one of the four original suspects (Poor Man), so presumably before Smiley could approach Esterhase, he needed to be sure that Esterhase himself was not the mole. What evidence led Smiley to that conclusion?
The meeting with Esterhase comes right after Smiley's long interview with Jim Prideaux. The only mention of Esterhase in the interview is that Esterhase visited Prideaux after his release, to give him money and insist on his silence. Prideaux says that during that visit, Esterhase mentioned the "Tinker, Tailor" code words specifically, and Smiley later comments: "Now how did he know about that?" But his question is never answered.
The only people who initially knew the words Tinker Tailor were Prideaux and Control. If Esterhase had learned it from Control, that would indicate that Control trusted him and presumably Smiley could do the same. But Prideaux had revealed that information during his interrogation in Russia, and so if Esterhase were the mole, he could also have learned it directly from Karla. So I don't understand how the knowledge of the code words exonerates Esterhase.
Of course, another possibility is that Smiley wasn't sure about Esterhase, but decided to gamble. This might fit better with the BBC series, in which Peter Guillam searches Esterhase for weapons and doesn't seem to trust him, but that could just be based on Guillam's personal dislike of Esterhase. But gambling like this seems out of character for Smiley; his approach seems more based on thorough investigation and logical deduction.
I've also read the novel, but didn't find an explanation there either.