Srimad Bhagavatam Canto 05, Chapter 19, Text 13

SB 5.19.13

idam hi yogesvara yoga-naipunam
 hiranyagarbho bhagavañ jagada yat
yad anta-kale tvayi nirgune mano
 bhaktya dadhitojjhita-duskalevarah
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
O my Lord, master of all mystic yoga, this is the explanation of the yogic process spoken of by Lord Brahma [Hiranyagarbha], who is self-realized. At the time of death, all yogis give up the material body with full detachment simply by placing their minds at Your lotus feet. That is the perfection of yoga.
 
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Srila Madhvacarya says:
 
yasya samyag bhagavati
 jñanam bhaktis tathaiva ca
niscintas tasya moksah syat
 sarva-papa-krto ’pi tu
 
“For one who very seriously practices devotional service during his lifetime in order to understand the constitutional position of the Supreme Personality of Godhead, liberation from this material world is guaranteed, even if he has previously been addicted to sinful habits.” This is also confirmed in Bhagavad-gita:
 
api cet su-duracaro
 bhajate mam ananya-bhak
sadhur eva sa mantavyah
 samyag vyavasito hi sah
 
“Even if one commits the most abominable actions, if he is engaged in devotional service he is to be considered saintly because he is properly situated.” (Bg. 9.30) The only purpose of life is to be fully absorbed in thoughts of Krsna and His form, pastimes, activities and qualities. If one is able to think of Krsna in this way, twenty-four hours a day, he is already liberated (svarupena vyavasthitih). Whereas materialists are absorbed in material thoughts and activities, devotees, on the contrary, are always absorbed in thoughts of Krsna and Krsna’s activities. Therefore they are already on the platform of liberation. One has to think of Krsna with full absorption at the time of death. Then he will certainly return home, back to Godhead, without a doubt.
Srimad Bhagavatam Canto 05, Chapter 19, Text 12
Srimad Bhagavatam Canto 05, Chapter 19, Text 14