حَدَّثَنَا إِسْمَاعِيلُ، قَالَ: ثنا أَحْمَدُ بْنُ صَالِحٍ، قَالَ: ثنا ابْنُ وَهْبٍ، حَدَّثَنِي حُيَيٌّ، عَنْ أَبِي عَبْدِ الرَّحْمَنِ، عَنْ عَبْدِ اللهِ بْنِ عَمْرٍو، قَالَ: قَالَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «مَنْ رَاحَ إِلَى مَسْجِدِ الْجَمَاعَةِ، فَخُطْوَةٌ تَمْحُو سَيِّئَةً، وَخُطْوَةٌ تَكْتُبُ حَسَنَةً ذَاهِبًا وَرَاجِعًا»
It is narrated from Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever walks to the mosque for congregational prayer, one step erases a sin and one step records a good deed, both going and returning."