I came to Ibn Umar after he had freed a slave. He picked up a stick or something from the ground and said, "There is not as much reward in it as this is worth, except that I heard the Messenger of Allah ﷺ say, 'Whoever slaps his slave or strikes him, his expiation is to free him.'"
أتيت ابن عمر، وقد أعتق مملوكا. قال: فأخذ من الأرض عودا أو شيئا، فقال: ما فيه من الأجر ما يسوى هذا إلا أني سمعت رسول الله ﷺ يقول: من لطم مملوكه، أو ضربه فكفارته أن يعتقه.
Muslim narrated it in the Book of Vows (1657) from Abu Kamil Fudayl bin Husayn Jahdari, who said, Abu Awana narrated to us, from Firas, from Zakwan Abu Salih, from Zazan, and he related it.Shubah also narrated it from Firas, and in his version he said, "Whoever strikes his slave for an offense he did not commit."