It is narrated from Sayyiduna Sakhbara (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever seeks knowledge, it is an expiation for whatever has passed."
Hadith Referenceسنن دارمي / مقدمه / 580
Hadith Gradingتحقیق (حسین سلیم أسد الدارانی):هذا إسناد فيه محمد بن حميد وهو ضعيف، [مكتبه الشامله نمبر: 580]
Hadith Takhrijاس حدیث کی سند محمد بن حمید اور ابوداؤد نفیع بن الحارث کی وجہ سے ضعیف ہے۔ دیکھئے: [ترمذي 2650]
In all these hadiths and narrations, there is encouragement to acquire knowledge, to spread knowledge, and to make it common, which is among the enduring good deeds (al-baqiyat al-salihat).
´Narrated 'Abdullah bin Sakhbarah:` narrated that the Prophet (ﷺ) said: "Whoever seeks knowledge, he is atoning for what has passed (of sins while doing so)."
Shaykh Dr. Abdur Rahman Freywai
Commentary: Note:
(In the chain of narration, Abu Dawood Nafi’ al-A’ma is a narrator whose hadith is rejected (matruk al-hadith). See: al-Da’eefah 5017)
Source: Sunan al-Tirmidhi – Majlis ‘Ilmi Dar al-Da‘wah, New Delhi Edition, Page: 2648