It is narrated from Sayyiduna Wathilah bin al-Asqa' (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever seeks knowledge and attains it, Allah records for him two portions of reward; and whoever seeks knowledge but does not attain it, Allah records for him one portion of reward."
Hadith Referenceالمعجم الكبير للطبراني / باب الواو / 18385