Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "When one of you goes from his house towards the mosque, for one step a good deed is written and for the other step an evil deed is erased."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4968