You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/06/08 19:17:05 UTC

[GitHub] mlaz commented on a change in pull request #1175: pwm_nrf52: fix crash on close not checking playing status

mlaz commented on a change in pull request #1175: pwm_nrf52: fix crash on close not checking playing status
URL: https://github.com/apache/mynewt-core/pull/1175#discussion_r194156733
 
 

 ##########
 File path: hw/drivers/pwm/pwm_nrf52/src/pwm_nrf52.c
 ##########
 @@ -545,8 +548,13 @@ nrf52_pwm_disable(struct pwm_dev *dev)
         return (-EINVAL);
     }
 
+    if (!instances[inst_id].playing) {
+        return (-EINVAL);
 
 Review comment:
   It is stated on the comments that this function returns a negative. However we can go with the non zero(i.e. use non-negative error codes) 
   in this case becausee we got no other data being returned.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services