Bhagavad Gita, Chapter 6, Verse 40
The Deity said: Verily, O son of Prithâ, there is destruction for him, neither here nor hereafter: for, the doer of good, O my son, never comes to grief.
Real, sincere effort here is never described as wasted, whatever the outcome looked like from the outside.
Krishna answers the fear directly and immediately: genuine effort on this path simply doesn't lead to ruin, in this life or beyond it. That reassurance comes before any explanation, the answer to the real worry comes first.