Sahih Muslim, Book 26, Hadith 13 (Muslim 4209)

Anas reported that Allah's Apostle (ﷺ) 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 Apoitle) said: Allah is indifferent to his inflicting upon himself chastisement, and he commanded him to ride.