Check for the right value before trying to write it to sysfs

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
[usb-moded] usb-moded release 0.72

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>