Bhagavad Gita · 9.30
अपि चेत्सुदुराचारो भजते मामनन्यभाक्।साधुरेव स मन्तव्यः सम्यग्व्यवसितो हि सः॥
api chet su-durāchāro bhajate mām ananya-bhāk sādhur eva sa mantavyaḥ samyag vyavasito hi saḥ
Even if the most sinful person worships Me with exclusive devotion, that person should be considered a saint, for they have rightly resolved.
— Bhagavad Gita 9.30
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)