The Messenger of Allah ﷺ said, "There is no man who commits a sin, then performs ablution well, then prays two units of prayer and seeks Allah's forgiveness, except that Allah forgives him."
قال رسول الله ﷺ: ما من رجل يذنب ذنبا فيتوضأ، فيحسن الوضوء، ثم يصلي ركعتين، ويستغفر الله إلا غفر الله له.
Reported by Abu Dawud (1521), Tirmidhi in the tafsir of Surah Al Imran, who graded it hasan, Ibn Majah (1395), and Ibn Hibban (623), who graded it sahih, all of them through routes going back to Uthman bin Mughira Thaqafi, from Ali bin Rabia Walibi, from Asma bin Hakam Fazari, from Ali bin Abu Talib, from Abu Bakr Siddiq, who related it.Its chain of transmission is hasan because of Asma bin Hakam, who is truthful. The discussion concerning him is set out at length in the book on wudu.