The Companion Abū Al-Dardāʾ – Allāh be pleased with him – said:
Knowledge only comes from learning, and forbearance comes from trying to be forbearing, and whoever seeks what is good will be given it, and whoever avoids evil will be protected from it.
Abū Khaythumah, Kitāb Al-ʿIlm (Albānī edition) ḥadīth 114. Al-Albānī grades its chain of transmission ṣaḥīḥ, and states it has been reported from the Prophet ﷺ. See Al-Ṣaḥīḥah 342.