Sahih Muslim Book 18, Hadith Number 4261.

Chapter : The reward of the judge when he tries to arrive at a decision, whether that decision is correct or incorrect.

‘Amr b. al-‘As reported that he heard Allah’s Messenger(may peace be upon him) as saying: When a judge gives a decision, having tried his best to decide correctly and is right, there are two rewards for him; and if he gave a judgment after having tried his best (to arrive at a correct decision) but erred, there is one reward for him.