Narrated Al-Bara:
"A man among the Companions of the Prophet (ﷺ) died before Khamr had been made unlawful. So when Khamr was made unlawful, some men said: 'How about our companions who died while drinking Khamr?' So (the following) was revealed: Those who believe and do righteous good deeds, there is no sin on them for what the ate, if they have Taqwa and perform good (5:93)." (DE)
English reference (DE): Vol. 5, Book 44, Hadith 3050 (DE)
Arabic reference (DE): Book 47, Hadith 3327 (DE)