It is shown that if M is a finitely presented completely pure injectiv
e object in a locally finitely generated Grothendieck category C such
that S = End(C) M is von Neumann regular, then S is semisimple. This i
s a generalized version of a well-known theorem of Osofsky, which incl
udes also a result of Damiano on PCI-rings. As an application, we obta
in a characterization of right hereditary rings with finitely presente
d injective hull.