Narrated Anas bin Malik:
that the Messenger of Allah (ﷺ) said: "Whoever goes out seeking knowledge, then he is in Allah's cause until he returns."