Jami` at-Tirmidhi, Book 15, Hadith 2 (In-Book)

[Ibn Buraidah narrated from his father that the Prophet said: "The judges are three: Two judges that are in the Fire, and a judge that is in Paradise. A man who judges without the truth, and he knows that. This one is in the Fire. One who judges while not knowing, ruining the rights of the people. So he is in the Fire. A judge who judges with the truth, that is the one in Paradise."] (Daif)

حَدَّثَنَا مُحَمَّدُ بْنُ إِسْمَاعِيلَ، حَدَّثَنِي الْحَسَنُ بْنُ بِشْرٍ، حَدَّثَنَا شَرِيكٌ، عَنِ الأَعْمَشِ، عَنْ سَعْدِ بْنِ عُبَيْدَةَ، عَنِ ابْنِ بُرَيْدَةَ، عَنْ أَبِيهِ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏ "‏ الْقُضَاةُ ثَلاَثَةٌ قَاضِيَانِ فِي النَّارِ وَقَاضٍ فِي الْجَنَّةِ رَجُلٌ قَضَى بِغَيْرِ الْحَقِّ فَعَلِمَ ذَاكَ فَذَاكَ فِي النَّارِ وَقَاضٍ لاَ يَعْلَمُ فَأَهْلَكَ حُقُوقَ النَّاسِ فَهُوَ فِي النَّارِ وَقَاضٍ قَضَى بِالْحَقِّ فَذَلِكَ فِي الْجَنَّةِ ‏" ‏ ‏.‏

sunnah.com