Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "Whoever performs ablution in his house, then goes to the mosque and fulfils one of the obligations prescribed by Allah, then for one of his steps a sin is erased and for the other step he is raised a degree."
(b) In the narration of al-Misri it is: "He fulfils one of the obligations prescribed by Allah; then for one of his steps an evil deed is removed and for the other step he is raised a degree."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4967