From Sahih Bukhari (Hadith 5647):
Narrated `Abdullah:I visited the Prophet (ﷺ) during his ailments and he was suffering from a high fever. I said, "You have a high fever. Is it because you will have a double reward for it?" He said, "Yes, for no Muslim is afflicted with any harm but that Allah will remove his sins as the leaves of a tree fall down
Reference: Bukhari 5647