All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The jurists stated that when washing an impurity, one should try to remove its taste, colour and smell. However, if its smell still remains because it is difficult to get rid of it, then this does not affect the validity of the prayer due to the difficulty.
Therefore, if you had endeavoured to remove the impurity while washing it, and you still found a smell to it, then this does not invalidate your prayer and your prayer is valid. However, if you had not endeavoured to remove the impurity and you found a smell thereafter, then this affects the validity of your prayer because you had not endeavoured to remove it. In which case, your clothes are impure and your prayer is invalid because among the conditions for the validity of the prayer is the purity of the body, clothes and place.
For more benefit, please refer to Fatwa 91406.
Allaah Knows best.