Sunan an-Nasa'i, Hadith 5381 ⓘ
It was narrated that Abu Hurairah said: "The Messenger of Allah [SAW] said: 'If a judge passes judgment and strives to reach the right conclusion and gets it right, he will have two rewards; if he strives to reach the right conclusion but gets it wrong, he will still have one reward."
أَخْبَرَنَا إِسْحَاقُ بْنُ مَنْصُورٍ، قَالَ حَدَّثَنَا عَبْدُ الرَّزَّاقِ، قَالَ أَنْبَأَنَا مَعْمَرٌ، عَنْ سُفْيَانَ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ أَبِي بَكْرِ، {بْنِ} مُحَمَّدِ بْنِ عَمْرِو بْنِ حَزْمٍ عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " إِذَا حَكَمَ الْحَاكِمُ فَاجْتَهَدَ فَأَصَابَ فَلَهُ أَجْرَانِ وَإِذَا اجْتَهَدَ فَأَخْطَأَ فَلَهُ أَجْرٌ " .
also referenced under: Book 49, Hadith 3 (In-Book) & Volume 6, Book 49, Hadith 5383 (DarusSalam)