Sahih al-Bukhari Book 78, Hadith 22
The Prophet (ﷺ) said, "Al-Wasil is not the one who recompenses the good done to him by his relatives,
but Al-Wasil is the one who keeps good relations with those relatives who had severed the bond of
kinship with him."
I heard the Prophet (ﷺ) saying openly not secretly, "The family of Abu so-and-so (i.e. Talib) are not among my protectors." `Amr said that there was a blank space (1) in the Book of Muhammad bin Ja`far. He added, "My Protector is Allah and the righteous believing people." `Amr bin Al-`As added: I heard the Prophet (ﷺ) saying, 'But they (that family) have kinship (Rahm) with me and I will be good and dutiful to them. "
That he said, "O Allah's Messenger (ﷺ)! What do you think about my good deeds which I used to do during the period of ignorance (before embracing Islam) like keeping good relations with my Kith and kin, manumitting of slaves and giving alms etc; Shall I receive the reward for that?" Allah's Messenger (ﷺ) said, "You have embraced Islam with all those good deeds which you did.