Sahih Bukhari | Volume 7 | Hadith Number 544

Narrated by 'Aisha
(The wife of the Prophet) Allah's Apostle said, "No calamity befalls a Muslim but that Allah expiates some of his sins because of it, even though it were the prick he receives from a thorn."