Abu Dawud Book 19, Hadith Number 3656.
Chapter : Seeking knowledge not for the pleasure of allah.
Narated By Abu Hurairah : The Prophet (PBUH) said: If anyone acquires knowledge of things by which Allah’s good pleasure is sought, but acquires it only to get some worldly advantage, he will not experience the arf, i.e. the odour, of Paradise.