Sayyiduna Sakhbarah (may Allah be pleased with him) said: Two men passed by the Messenger of Allah (peace and blessings be upon him) while he (peace and blessings be upon him) was sitting and admonishing. He (peace and blessings be upon him) said: "Sit down, for you are upon good." When the Messenger of Allah (peace and blessings be upon him) got up and his (peace and blessings be upon him) Companions dispersed, the two of them stood up and said: "O Messenger of Allah! You said to us: 'Sit down, for you are upon good.' Was that specific to us or for people in general?" He (peace and blessings be upon him) said: "There is no servant who seeks knowledge except that it becomes an expiation for his past sins."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6585