Jami` at-Tirmidhi #1326
The Chapters On Judgements From The Messenger of Allah 15:6
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."