Bhagavad Gita 9.30

अपि चेत्सुदुराचारो भजते मामनन्यभाक् |
साधुरेव स मन्तव्य: सम्यग्व्यासितो हि स:

Translation

Even if the vilest sinners worship Me with exclusive devotion, they are to be considered righteous because they have made the proper resolve.