Preheat your oven to 350°F (175°C).
Grease your loaf pan with butter or non-stick spray.
Cream together the softened butter and white sugar until light and fluffy.
Beat in the eggs one at a time, mixing well after each addition. Stir in the mashed bananas.
Add the sour cream and vanilla extract, stirring until smooth.
In a separate bowl, whisk together the flour, cinnamon, baking soda, and salt.
Gradually add the dry ingredients to the wet mixture, stirring gently until just combined.
Fold in the chopped walnuts if using.
Pour the batter into the prepared loaf pan and smooth the top. Bake for 60-65 minutes.
Let it cool in the pan for about 10 minutes, then transfer to a cooling rack.