.....
Imām Aḥmad Ibn Naṣr Al-Marwazi reported in Kitāb Aṣ-Ṣalāh (the Book of Prayer) that Abū Al-ʿĀliyah said, “The Prophet’s Companions used to think
that no sin would harm a person who says ‘Lā
ilāha illāllāh,’ just as no good deed would benefit a person who joins partners
with Allāh. So Allāh revealed,
Obey
Allāh and obey the Messenger and do not invalidate your deeds.
This
made them fear that some sins could nullify their deeds.”*
*Aṣ-Ṣalāh by Al-Marwazi 2:645.
Source: Tafsir Ibn Kathir (Abridged) volume 9, p. 117.