It is narrated from Sayyiduna Ibn Amr, may Allah be pleased with him, that the Noble Prophet, peace and blessings be upon him, said: "Whoever goes towards the congregational mosque, for each step he takes, one sin is forgiven and one good deed is written for him. This ruling applies both when going and returning."