The Messenger of Allah ﷺ saw a man that he was supported between his sons. He asked about him, and (the people) said: He has taken a vow to walk (on foot). Thereupon he said: Allah has no need that this man should punish himself, and he ordered him to ride. Abu Dawud said: 'Amr b. Abi 'Amir has also narrated a similar tradition from al-A'raj on the authority of Abu Hurairah from the Prophet ﷺ.
أَنَّ رَسُولَ اللَّهِ ﷺ رَأَى رَجُلاً يُهَادَى بَيْنَ ابْنَيْهِ فَسَأَلَ عَنْهُ فَقَالُوا نَذَرَ أَنْ يَمْشِيَ فَقَالَ إِنَّ اللَّهَ لَغَنِيٌّ عَنْ تَعْذِيبِ هَذَا نَفْسَهُ وَأَمَرَهُ أَنْ يَرْكَبَ