Sunan an-Nasa'i, Book 45, Hadith 127 (In-Book)

It was narrated that Abu Rimthah said; "I came to the Prophet with my father and he said: 'Who is this with you?' He said:' my son, I bear witness (that he is my son). He said: 'You cannot be affected by his sin or he by yours.

أَخْبَرَنِي هَارُونُ بْنُ عَبْدِ اللَّهِ، قَالَ حَدَّثَنَا سُفْيَانُ، قَالَ حَدَّثَنِي عَبْدُ الْمَلِكِ بْنُ أَبْجَرَ، عَنْ إِيَادِ بْنِ لَقِيطٍ، عَنْ أَبِي رِمْثَةَ، قَالَ أَتَيْتُ النَّبِيَّ صلى الله عليه وسلم مَعَ أَبِي فَقَالَ ‏"‏ مَنْ هَذَا مَعَكَ ‏"‏ ‏.‏ قَالَ ابْنِي أَشْهَدُ بِهِ ‏.‏ قَالَ ‏"‏ أَمَا إِنَّكَ لاَ تَجْنِي عَلَيْهِ وَلاَ يَجْنِي عَلَيْكَ ‏"‏ ‏.‏

sunnah.com