Sunan al-Darimi 263
أَخْبَرَنَا أَبُو عَاصِمٍ، حَدَّثَنَا مُحَمَّدُ بْنُ عُمَارَةَ بْنِ حَزْمٍ، حَدَّثَنِي عَبْدُ اللَّهِ بْنُ عَبْدِ الرَّحْمَنِ، قَالَ: قَالَ رَسُولُ اللَّهِ ﷺ : «لَا يَطْلُبُ هَذَا الْعِلْمَ أَحَدٌ لَا يُرِيدُ بِهِ إِلَّا الدُّنْيَا، إِلَّا حَرَّمَ اللَّهُ عَلَيْهِ عَرْفَ الْجَنَّةِ يَوْمَ الْقِيَامَةِ»
Abu ʿAsim informed us; he said: Muhammad ibn ʿUmarah ibn Hazm narrated to us; he said: ʿAbdullah ibn ʿAbd ar-Rahman narrated to me; he said: The Messenger of Allah ﷺ said: "No one seeks this knowledge, intending by it nothing but this world, except that Allah forbids him the fragrance of Paradise on the Day of Resurrection."