Sunan At-Tirmidhi

Hadith #2655

Narrated Ibn 'Umar:that the Prophet (ﷺ) said: ""Whoever learns knowledge for other than (the sake of) Allah, or intends by it other than Allah, then let him take his seat in the Fire