On automorphisms of some finite p-groups