It is narrated from Al-Sha'bi (may Allah have mercy on him) that if someone gave charity and then that wealth came back to him through inheritance, Al-Sha'bi (may Allah have mercy on him) said: "Eat it, Allah has not fed you anything unlawful."
Hadith Referenceسنن سعید بن منصور / كتاب ولاية العصبة / 1421
Hadith Takhrij«أخرجه سعيد بن منصور فى «سننه» ترقيم الدرالسلفية برقم:، 244، وابن أبى شيبة فى «مصنفه» برقم: 21403»