The Gemara in Sh'vuos 22b:
שבועה שלא אוכל, ואכל נבילות וטריפות, שקצים ורמשים - חייב, ור' שמעון פוטר; והוינן בה, אמאי חייב? מושבע ועומד מהר סיני הוא! רב ושמואל ור' יוחנן דאמרי: בכולל דברים המותרין עם דברים האסורין
Someone swears not to eat, and they eat forbidden foods, they are responsible [for violating their oath]. Why are they responsible for their oath? They are already responsible for this from Har Sinai! Rav Shmuel and R' Yochanan said: because he included permissible things with the forbidden things.
An oath that only includes things that are already forbidden is not valid, because he is already "sworn" into not doing these things. There are various exceptions, such as if his oath takes effect because it includes things that are not already forbidden from Har Sinai.