Sunan Abi Dawud, Book 21, Hadith 93 (Abu Dawud 3182)

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.