Sahih Muslim Book 37, Hadith Number 6655.

Chapter : The words of Allah “The good deeds take away the evil deeds”.

‘Abdullah b. Mas’ud reported that a person kissed a woman and he came to Allah’s Apostle (may peace be upon him) and made a mention of that to him. It was (on this occasion) that this verse was revealed: “And observe prayer at the (two) ends of the day and in the first hours of the night. Surely, good deeds take away evil deeds. That is a reminder for the mindful” (xi. 115). That person said: Allah’s Messenger, does it concern me only? He (the Holy Prophet) said: It concerns every one of my Unimah, who acts according to it.