Narrated Abu Hurairah:The Prophet (ﷺ) as saying: Walk quickly with a funeral, for if the dead person was good it is a good condition to which you are sending him on, but it he was otherwise it is an evil of which you are riding yourselves
Hadith No. 3181
Sunan Abu Dawud
Gradings:
Al-Albani:
Sahih
Muhammad Muhyi Al-Din Abdul Hamid:
Sahih
Shuaib Al Arnaut:
Sahih
Zubair Ali Zai:
Sahih Bukhari (1315) Sahih Muslim (944)