(4) باب مَنْ نَذَرَ أَنْ يَمْشِيَ إِلَى الْكَعْبَةِ
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.
Reference: Sahih Muslim 1642
In-book reference: Book 26, Hadith 13
USC-MSA web (English) reference(deprecated numbering scheme): Book 14, Hadith 4029