Can someone swear off something that is already prohibited to them?
For instance: "I swear I won't eat non-kosher."
This is called a sh'vu'as shav (useless oath). The utterance has no effect because it is not stating or changing anything that was not already binding and true. The opening paragraph here has a couple other examples.
I think it is rather called mushba veomed mehar sinai (מושבע ועומד מהר סיני). That means he already swared about it on Sinai, hence swearing again has no effect.
Here is an article for example about that.