Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates from the Prophet (peace and blessings be upon him): "When a ruler exercises his judgement (ijtihad) and arrives at what is correct, he has a double reward; and when a ruler errs in his ijtihad, he receives one reward."
Only Ma'mar narrated it from Sufyan, and Abd al-Razzaq alone narrated it from him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20368