Sayyiduna Abu Mas'ud (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) said: "When a man spends on his family, hoping for its reward from Allah, it is charity for him." (The narrator said:) I asked: "Is this narrated from the Prophet (peace and blessings be upon him)?" He said: "Yes, from the Prophet (peace and blessings be upon him)."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14594
A similar hadith is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) from the Prophet (peace and blessings be upon him).
Ibrahim bin Tahman narrated it in this way.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14595