Sunan Abi Dawud, Book 41, Hadith 4962 (USC-MSA)

Abu al-Malih reported on the authority of a man : I was riding on a mount behind the prophet (May peace be upon him). It stumbled. Thereupon I said: May the devil perish! He said: do not say; may the devil perish! For you say that, he will swell so much so that he will be like a house, and say: by my power. But say: in the name of Allah; for when you say that, he will diminish so much so that he will be like a fly.

حَدَّثَنَا وَهْبُ بْنُ بَقِيَّةَ، عَنْ خَالِدٍ، - يَعْنِي ابْنَ عَبْدِ اللَّهِ - عَنْ خَالِدٍ، - يَعْنِي الْحَذَّاءَ - عَنْ أَبِي تَمِيمَةَ، عَنْ أَبِي الْمَلِيحِ، عَنْ رَجُلٍ، قَالَ كُنْتُ رَدِيفَ النَّبِيِّ صلى الله عليه وسلم فَعَثَرَتْ دَابَّتُهُ فَقُلْتُ تَعِسَ الشَّيْطَانُ ‏.‏ فَقَالَ ‏ "‏ لاَ تَقُلْ تَعِسَ الشَّيْطَانُ فَإِنَّكَ إِذَا قُلْتَ ذَلِكَ تَعَاظَمَ حَتَّى يَكُونَ مِثْلَ الْبَيْتِ وَيَقُولَ بِقُوَّتِي وَلَكِنْ قُلْ بِسْمِ اللَّهِ فَإِنَّكَ إِذَا قُلْتَ ذَلِكَ تَصَاغَرَ حَتَّى يَكُونَ مِثْلَ الذُّبَابِ ‏" ‏ ‏.‏

sunnah.com