Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) said: "Whoever comes to the house of the deceased receives one qirat; if he goes with the funeral, he receives one qirat; if he offers its funeral prayer, he receives one qirat; and if he waits for it until it is buried, he receives one qirat." (Allamah al-Haythami says:) I say: There is another hadith from him in the Sahih, different from this one.
Al-Bazzar recorded it. Its chain contains Ma'di bin Sulayman; al-Tirmidhi graded his hadith sahih, Abu Hatim and others declared him thiqah (trustworthy), and al-Nasa'i (may Allah have mercy on him) and Abu Zur'ah declared him da'if (weak). The rest of its narrators are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الجنائز / 4140