(68) باب التَّبَسُّمِ وَالضَّحِكِ
Narrated `Abdullah bin `Umar:
When Allah Apostle was in Ta'if (trying to conquer it), he said to his companions, "Tomorrow we will return (to Medina), if Allah wills." Some of the companions of Allah's Messenger (ﷺ) said, "We will not leave till we conquer it." The Prophet (ﷺ) said, "Therefore, be ready to fight tomorrow." On the following day, they (Muslims) fought fiercely (with the people of Ta'if) and suffered many wounds. Then Allah's Messenger (ﷺ) said, "Tomorrow we will return (to Medina), if Allah wills." His companions kept quiet this time. Allah's Messenger (ﷺ) then smiled.
Reference: Sahih al-Bukhari 6086
In-book reference: Book 78, Hadith 114
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 8, Book 73, Hadith 109