Usually, rooting or flashing custom ROMs voids your warranty. In order to recover your warranty, you should wipe your data (be careful with that if you're running a dangerous 4.0.4 kernel!) and then flash the official Samsung ROM for your country using Odin. In addition, you should reset your custom flash counter with a jig or TriangleAway (note that TriangleAways requires root; you can run it on your rooted ROM before flashing the official Samsung one).