It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Holy Prophet (peace and blessings be upon him) said: When a person dies, all his deeds come to an end except for three: ongoing charity, beneficial knowledge, and a righteous child who prays for his parents.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 8844