It is narrated from Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) that indeed the Messenger of Allah (peace and blessings be upon him) said: "Whoever intends to commit a sin but then abandons it, for him there is one good deed. And whoever intends to commit a sin and then acts upon it, then seeks forgiveness from Allah, he will be forgiven."
Hadith Referenceمسند الشهاب / 369
Hadith Gradingمحدثین:إسناده ضعيف
Hadith Takhrij«إسناده ضعيف ، ابن لہیعہ مدلس ومختلط راوی ہے»