Narrated Anas: The Prophet, peace be upon him, saw an old man walking, supported by his two sons, and asked about him. The people informed him that he had vowed to go on foot (to the Ka’abah). He said, “Allah is not in need of this old man’s torturing himself,” and ordered him to ride.
[3: 88- O.B. Sahih Al-Bukhari)

Narrated Uqbah bin Aamir: My sister vowed to go on foot to the Ka’abah, and she asked me to take the verdict of the Prophet, peace be upon him. So I did and the Prophet, peace be upon, said, “She should walk and also should ride.”
[3: 89- O.B. Sahih Al-Bukhari)