Sahih Muslim Book 4, Hadith Number 2111.

Chapter : It is permissible to ride back after offering funeral prayer.

Jabir Ibn Samura reported that the Holy Prophet (may peace be upon him) said (funeral) prayer on Ibn Dahdah: then an unsaddled horse was brought to him and a person hobbled it, and he (the Messenger of Allah) rode upon it and it bounded and we followed it and ran after it. One of the people said that the Holy Prophet (may peace be upon him) remarked: How many among hanging bunches in the Paradise are meant for Ibn Dahdah?