The Prophet ﷺ said, "Whoever follows the funeral of a Muslim out of faith and seeking reward, prays over it, and remains until it is buried, returns with two qirats of reward, each qirat like Mount Uhud. Whoever prays over it and returns before it is buried returns with one qirat."
حدثنا يحيى قال حدثنا عوف قال حدثنا محمد
عن النبي ﷺ قال من اتبع جنازة مسلم إيمانا واحتسابا فصلى عليها وأقام حتى تدفن رجع بقيراطين من الأجر كل قيراط مثل أحد ومن صلى عليها ورجع قبل أن تدفن فإنه يرجع بقيراط