Sahih Muslim, Book 27, Hadith 9 (Muslim 4223)

Abd al-Rahman b. Samura reported Allah's Messenger (ﷺ) as saying:

Do not swear by idols, nor by your fathers.