Ayesha reported,

I asked, "Messenger of Allah, Ibn Judaan in the days of ignorance used to maintain ties of kinship and feed the poor. Will that benefit him?"He replied, "It will not benefit him. He never once said, 'My Lord, forgive me my sins on the Day of Judgment.'"

Azami 178

Sahih

عن عائشة قالت

قلت: يا رسول الله ابن جدعان كان في الجاهلية يصل الرحم ويطعم المسكين فهل ذاك نافعه؟ قال: لا ينفعه إنه لم يقل يوما رب اغفر لي خطيئتي يوم الدين.

الأعظمي 178صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Qualities of faith
Section
Those who do not believe are not benefited by righteous deeds
Numbering
Jami al-Kamil 178 (2nd edition)
Azami 178