The Prophet ﷺ used to go to Quba both riding and on foot.
حدثنا أبو سلمة حدثنا ابن بلال يعني سليمان عن عبد الله بن دينار
أن النبي ﷺ كان يأتي قباء راكبا وماشيا
Its isnad is sahih. Sulayman bin Bilal, his reliability was already established at 1463, and we add here that he was deemed reliable by Ahmad, Ibn Main, Ibn Saad, and others, and Bukhari gave him a biographical entry in al-Kabir 2/2/5. The addition of the word "an" is necessary, as is clear. It was mistakenly omitted from H, and we have added it from K and M. The hadith is a repetition of 5330.