pwm.c: Fix error in mraa_pwm_read_duty

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>