If you're looking to continue with your jailbroken iDevice and wish to remove the jailbreak, you can do so by restoring the device using iTunes 10.5.x.

The result of removing the jailbreak will be to make the device as good as new; it removes all trace of the jailbreak and deletes all jailbroken files. You can remove the jailbreak at any time, thereby possibly resolving performance issues.

However... before proceeding with the tutorial, remember to make sure you are using the latest version of iTunes, either on your PC or Mac. Here are the steps you must follow...

Step 1: Connect the iDevice to the computer and open iTunes. The program will ask for permission to make a backup for all data, contacts and settings on your device.

Step 2: Click on the Restore button to restore your iDevice's factory settings. The firmware which is required to restore your device will be downloaded and extracted automatically. The restoration will begin as soon as it is done.

Step 3: Once the restoration is done, the device will automatically restart for the desired changes to take place. It will then allow you to retrieve all data and settings previously stored on the device.

Step 4: Next, to apply the backup data to your device, click on the Continue button to restore the device. Here, you may select Set up a new iPhone after restoring your iPhone but remember you will lose all saved data if that option is selected.

Step 5: Finally, select the photographs folder and select Camera Roll. If you find any photos of jailbreak apps, delete them.

Check the Video on how to Unjailbreak Your device:

(Information from iPhoneStuffs4u.com)