It is disliked to show preference to one child over the others in gifts

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

353. Chapter: It is disliked to show preference to one child over the others in gifts

1773. An-Nu'man ibn Bashir reported that his father brought him to the Messenger of Allah, may Allah bless him and grant him peace, and said, 'I gave this son of mine a slave I had.' The Messenger of Allah, may Allah bless him and grant him peace, asked, 'Did you give every son of yours the same thing?' He said, 'No.' The Prophet, may Allah bless him and grant him peace, said, 'Then take him back.'"

In one variant, "The Messenger of Allah, may Allah bless him and grant him peace, said, 'Did you do this for all of your sons?' He said, 'No.' He said, 'Fear Allah and be just to your children.' My father returned and took that sadaqa back."

In one variant, "The Messenger of Allah, may Allah bless him and grant him peace, said, 'O Bashir, do you have any sons other than this one?' He said, 'Yes.' He said, 'Did you give all of them the same as this?' He said, 'No.' He said, 'Do not make me a witness for I will not be a witness to an injustice.'"

In one variant, "Do not make me a witness to an injustice."

In one variant, "Make other than me a witness to this!" Then he said, "Do you want them all be equally dutiful to you?" He said, "Yes indeed." He said, "Then do not do this." [Agreed upon]