Jami` at-Tirmidhi, Book 15, Hadith 6 (Tirmidhi 1339)

Abu Hurairah narrated that the Messenger of Allah (ﷺ) said:

"When the judge passes a judgement in which he strived and was correct, then he receives two rewards. And when he judges and is mistaken, then he receives one reward."