The Messenger of Allah ﷺ said, "For every step a person takes toward the prayer, a good deed is recorded for him and a sin is erased."
حدثنا إبراهيم بن خالد حدثنا رباح عن معمر عن يحيى بن أبي كثير عن محمد بن عبد الرحمن
عن رسول الله ﷺ قال كل خطوة يخطوها إلى الصلاة يكتب له بها حسنة ويمحى عنه بها سيئة
Its chain of transmission is sahih. Muhammad bin Abdul-Rahman bin Thawban Qurashi Amiri is a trustworthy successor, whose reliability was established earlier at 5322, and I add here that Ibn Abu Hatim reported it at 2/312, and the hadith is in Jami al-Masanid wal-Sunan 7:473. Its meaning has already passed in similar form within a lengthy hadith at 7424, narrated by Amash from Abu Salih, from Abu Hurairah. Its meaning has also already passed in the hadith of Abdullah bin Amr bin As at 6599.