It is narrated from Sayyiduna Mu'awiyah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Whomever Allah intends good for, let Him grant him understanding of the religion."
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 16961