The Book of the Prohibited actions
Riyad as-Salihin #941
كتاب الأمور المنهي عنها
وعن أبي هريرة رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم «من تعلم علمًا مما يبتغى به وجه الله عز وجل لا يتعلمه إلا ليصيب به عرضًا من الدنيا، لم يجد عَرف الجنة يوم القيامة» يعني ريحها. رواه أبو داود بإسناد صحيح والأحاديث في الباب كثير مشهورة.
Abu Hurairah (May Allah be pleased with him) said:
The Messenger of Allah (ﷺ) said, “A person who acquires (religious) knowledge, which is (normally) acquired to gain the Pleasure of Allah, (for the sole reason) to secure worldly comforts will not even smell the fragrance of Jannah on the Day of Resurrection (i.e., will not enter Jannah).”.
وعن أبي هريرة رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم " من تعلم علمًا مما يبتغى به وجه الله عز وجل لا يتعلمه إلا ليصيب به عرضًا من الدنيا، لم يجد عَرف الجنة يوم القيامة" يعني ريحها. رواه أبو داود بإسناد صحيح والأحاديث في الباب كثير مشهورة.
The Messenger of Allah (ﷺ) said, "A person who acquires (religious) knowledge, which is (normally) acquired to gain the Pleasure of Allah, (for the sole reason) to secure worldly comforts will not even smell the fragrance of Jannah on the Day of Resurrection (i.e., will not enter Jannah).".
— Riyad as-Salihin, Hadith 941