ENOfficial
Sakhbara al-Azdi reported God’s messenger as saying, “If anyone seeks knowledge, it will be an atonement for past sins.” Tirmidhi and Darimi transmitted it, Tirmidhi saying that this is a tradition whose isnad is weak, and that Abu Dawud the transmitter is declared to be weak.
Source: sunnah.com
Other translations
Arabic
وَعَن سَخْبَرَة الْأَزْدِيّ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مِنْ طَلَبَ الْعِلْمَ كَانَ كَفَّارَةً لِمَا مَضَى» . رَوَاهُ التِّرْمِذِيُّ وَالدَّارِمِيُّ وَقَالَ التِّرْمِذِيُّ: هَذَا حَدِيثٌ ضَعِيفُ الْإِسْنَادِ وَأَبُو دَاوُدَ الرَّاوِي يُضَعَّفُ
sunnah.com