"There is no sin for those who believe and do righteous deeds in what they have tasted [consumed] if they fear [Allah]." This means: They drank of the wine before it was forbidden.
Al-Hasan said:
When the prohibition of wine was revealed, they said: "What about our brothers who died while it was in their stomachs, even though Allah has informed [us] that it is a 'rijs' (impurity)?" So Allah revealed: "There is no sin for those who believe and do righteous deeds..." [that is to say: no blame].