Sahih Muslim Book 14, Hadith Number 4029.

Chapter : He who took the vow that he would go on foot to the Ka’ba.

Anas reported that Allah’s Apostle (may peace be upon him) saw an old man being supported between his two sons. He (the Holy Prophet) said: What is the matter with him? They said: He had taken the vow to walk (on foot to the Ka’ba). Thereupon he (Allah’s Apostle) said: Allah is indifferent to his inflicting upon himself chastisement, and he commanded him to ride.