All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad,
, is His slave and Messenger.
The authentic version of the hadeeth reads, "Your smiling in the face of your brother is charity..." [At-Tirmithi and others - Al-Albaani graded it saheeh (sound)]
The statement that you mentioned, "Your smiling in the face of someone is charity," is not a hadeeth as far as we know. If you mistakenly changed it and did not deliberately lie about a hadeeth attributable to the Prophet,
, then you bear no sin for that. The Prophet,
, said, "Verily, Allaah, The Exalted, has pardoned for me my community: their mistakes, their forgetfulness, and that which they are forced to do under duress." [Ibn Maajah - Al-Albaani graded it saheeh]
The relevant warning applies only to deliberately attributing a lie to the Prophet,
, as evidenced by the hadeeth that reads, "Whoever deliberately tells lies about me, let him take his place in Hellfire."
Allaah knows best.