He redeemed himself by going the right thing and sharing what he knows about the void century with the whole world. The consequence of his actions is his death and the destruction of his laboratory.
If Vegapunk had stayed alive, all his knowledge could be used to fight the world government and its weapons arsenal.