Since you bought it, it's now your property (the device) so you are free to do what you want with it. However modding it breaks Nintendo's Tos and they have right to deny any services that they provide to you (Nintendo E shop, 3ds repairs/replacements, playing on Nintendo game servers, etc)