Sunan an-Nasa'i, Book 21, Hadith 102 (Nasa'i 1924)

It was narrated from Abu Sa'eed that a funeral passed by the Messenger of Allah and he stood up. (One of the narrators) 'Amr said:

"If a funeral passed by the Messenger of Allah he would stand up."