A note on commuting automorphisms of some finite p-groups