narrated that the Prophet (ﷺ) said: "Whoever seeks knowledge, he is atoning for what has passed (of sins while doing so)."
Jami` at-Tirmidhi Book 41, Hadith 4