All's well that ends well.
John Heywood (1867). “The proverbs and epigrams of John Heywood: with an app. of variations”, p.21

All's well that ends well.