Before you take your jailbroken iPhone back to Apple store for service, one important thing you have to do is to remove the jailbreak and restore it back to the original setting. This is crucial as jailbreaking voids your warranty according to Apple.
However, it’s pretty easy to convert your jailbroken iPhone back to factory setting. This tutorial walks you through the steps to restore your iPhone. The procedures should apply to both iPad and iPod touch as well.