Sunan Abi Dawud, Book 8, Hadith 134 (Abu Dawud 1550)

Anas bin Malik narrated that the Prophet (ﷺ) would say:

"O Allah, I seek refuge in You from a prayer that is of no benefit."