Sahih al-Bukhari Book 75, Hadith 21
I visited the Prophet (ﷺ) during his illness and touched him while he was having a fever. I said to him,
"You have a high fever; is it because you will get a double reward?" He said, "Yes. No Muslim is
afflicted with any harm, but that his sins will be annulled as the leave of a tree fall down."
I visited Allah's Messenger (ﷺ) while he was suffering from a high fever. I touched him with my hand and said, "O Allah's Messenger (ﷺ)! You have a high fever." Allah's Messenger (ﷺ) said, "Yes, I have as much fever as two men of you have." I said, "Is it because you will get a double reward?" Allah's Messenger (ﷺ) said, "Yes, no Muslim is afflicted with harm because of sickness or some other inconvenience, but that Allah will remove his sins for him as a tree sheds its leaves."
Allah's Messenger (ﷺ) entered upon sick man to pay him a visit, and said to him, "Don't worry, Allah willing, (your sickness will be) an expiation for your sins." The man said, "No, it is but a fever that is boiling within an old man and will send him to his grave." On that, the Prophet (ﷺ) said, "Then yes, it is so."