Sayyidina Anas reported that Allah’s Messenger came by an old man being led by his two sons. He asked about him and was told that he had vowed to walk. He said, ‘Indeed, Allah has no concern with his punishing himself. Instruct him to ride.’
[Bukhari 6701, Muslim 3301]