"The Messenger of Allah passed by an old man who was being supported between two men and said: 'What is the matter with him?' They said: 'He vowed to walk.' He said: 'Allah has no need for him to torture himself. Tell him to ride.'" So he was told to ride. (Using translation from Nasāʾī 3853)
أَنَسٌ مُرَّ بِشَيْخٍ كَبِيرٍ يُهَادَى بَيْنَ ابْنَيْهِ قَالَ فَقَالَ مَا بَالُ هَذَا؟ قَالُوا نَذَرَ يَا رَسُولَ اللهِ أَنْ يَمْشِيَ قَالَ إِنَّ اللهَ عَنْ تَعْذِيبِ هَذَا نَفْسَهُ لَغَنِيٌّ فَأَمَرَهُ أَنْ يَرْكَبَ فَرَكِبَ