Fix typo in error handling for pwm write.