Don't worry! Rooting a device is entirely legal in some countries, but none of the cops are riding their cars to get on you for rooting a smartphone. It would only void the warranty of your smartphone, and except that, there would be no single drawback of rooting a smartphone stating legal provisions.