كتاب الجنائز
11  
The Book of Prayer - Funerals
(17)
Chapter: The virtue of offering the funeral prayer and following the bier
(17)
باب فَضْلِ الصَّلاَةِ عَلَى الْجَنَازَةِ وَاتِّبَاعِهَا ‏
Sahih Muslim 945 d

Abu Huraira reported Allah's Apostle (ﷺ) as saying:

He who offered prayer over the dead, but did not follow the bier, for him is the reward of one qirat, and he who followed it, for him is the reward of two qirats. It was asked what the qirats were. He said: The smaller amongst the two is equivalent to Uhud.
وَحَدَّثَنِي مُحَمَّدُ بْنُ حَاتِمٍ، حَدَّثَنَا بَهْزٌ، حَدَّثَنَا وُهَيْبٌ، حَدَّثَنِي سُهَيْلٌ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏"‏ مَنْ صَلَّى عَلَى جَنَازَةٍ وَلَمْ يَتْبَعْهَا فَلَهُ قِيرَاطٌ فَإِنْ تَبِعَهَا فَلَهُ قِيرَاطَانِ ‏"‏ ‏.‏ قِيلَ وَمَا الْقِيرَاطَانِ قَالَ ‏"‏ أَصْغَرُهُمَا مِثْلُ أُحُدٍ ‏"‏ .‏
Reference : Sahih Muslim 945d
In-book reference : Book 11, Hadith 70
USC-MSA web (English) reference : Book 4, Hadith 2065
  (deprecated numbering scheme)