jacobrosenthal commented on a change in pull request #836: PWM add cycle 
interrupt handling to pwm_nrf52 driver
URL: https://github.com/apache/mynewt-core/pull/836#discussion_r170033374
 
 

 ##########
 File path: hw/drivers/pwm/pwm_nrf52/src/pwm_nrf52.c
 ##########
 @@ -177,9 +249,10 @@ nrf52_pwm_close(struct os_dev *odev)
 
     dev = (struct pwm_dev *) odev;
     inst_id = dev->pwm_instance_id;
+    assert(instances[inst_id].in_use);
 
 Review comment:
   I think probably all these asserts needs to be just return codes. My 
understanding is that asserts are for system startup where theres no one to 
return to or no reason to keep going on failure, not runtime errors especially 
when the function already allows a return code

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to