How to remove jailbreak

Hey all,
Im currently on 5.0.1 and jailbroke on my 4S.
If I want to remove the jailbreak and upgrade to 5.1, what do I need to do?
Should I restore back to 5.0.1 first, or will simply upgrading to 5.1 via Itunes remove the jailbreak?

Luca
Upgrading to 5.1 will automatically get rid of your jailbreak.
A simple straightforward Restore in iTunes will do the job. The jailbreak will be removed and 5.1 installed. Then you can do an iCloud/iTunes backup restore.

PS: Also you should Read Before Posting (bottom of first post) . 😉
Brilliant, thankyou.
I missed that last question, dont think I scrolled down far enough! 🙂

Original thread: https://forums.imore.com/threads/how-to-remove-jailbreak.233591/