Sunan Abi Dawud, Hadith 1367

Narrated Abu Hurairah: The Prophet as saying: If anyone fasts during Ramadan because of faith and in order to seek his reward from Allah, his previous sins will be forgiven to him. If anyone prays in the night of the power (lailat al-qadr) because of faith and in order to seek his reward from Allah his previous sins will be forgiven for him. Abu Dawud said: This tradition has been transmitted in a similar manner by Yahya b. Abi Kathir and Muhammad b. 'Amr from Abu Salamah.

حَدَّثَنَا مَخْلَدُ بْنُ خَالِدٍ، وَابْنُ أَبِي خَلَفٍ، - الْمَعْنَى - قَالاَ حَدَّثَنَا سُفْيَانُ، عَنِ الزُّهْرِيِّ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، يَبْلُغُ بِهِ النَّبِيَّ صلى الله عليه وسلم ‏ "‏ مَنْ صَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ وَمَنْ قَامَ لَيْلَةَ الْقَدْرِ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ ‏" ‏ ‏.‏ قَالَ أَبُو دَاوُدَ وَكَذَا رَوَاهُ يَحْيَى بْنُ أَبِي كَثِيرٍ عَنْ أَبِي سَلَمَةَ وَمُحَمَّدُ بْنُ عَمْرٍو عَنْ أَبِي سَلَمَةَ ‏.‏

sunnah.com

also referenced under: Hadith 1372 (DarusSalam)