Newbie question about ohm law

It depends on what the device is. If it requires 5V at 10mA then you don't need any resistor to stop it from burning, just connect it to the 5V and it will take 10mA.