Sunan Ibn Majah, Book 6, Hadith 85 (Ibn Majah 1517)

It was narrated that Abu Hurairah said:

“The Messenger of Allah (ﷺ) said: ‘Whoever offers the funeral prayer in the mosque will have nothing (i.e., no reward).’”