Sahih Muslim Book 4, Hadith Number 2110.

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

It is reported on the authority of Jabir Ibn Samura that an unsaddled horse was brought to the Holy Prophet (may peace be upon him) and he rode on it when he returned after having offered the funeral prayer of Ibn Dahdah and we walked on foot around him.