The Prophet ﷺ said, "Whoever suffers an injury to his body and forgoes retaliation for the sake of Allah, it will be an expiation for him."
حدثنا يحيى بن سعيد القطان عن مجالد عن عامر عن المحرر بن أبي هريرة
عن النبي ﷺ قال من أصيب بشيء في جسده فتركه لله كان كفارة له
Its chain of transmission is hasan, because of Khalid. As for Muharrar bin Abu Hurairah, he is trustworthy, as noted previously in his father's musnad. The hadith was mentioned earlier at 16841.