ccollins476ad commented on a change in pull request #1338: Drv2605 odds and ends
URL: https://github.com/apache/mynewt-core/pull/1338#discussion_r211439727
##########
File path: hw/drivers/drv2605/src/drv2605.c
##########
@@ -78,6 +79,11 @@ drv2605_write8(struct sensor_itf *itf, uint8_t reg, uint8_t
value)
.buffer = payload
};
+ rc = sensor_itf_lock(itf, MYNEWT_VAL(DRV2605_ITF_LOCK_TMO));
+ if (rc) {
+ goto err;
Review comment:
Be careful not to unlock an already-unlocked mutex. This should be `return
rc` rather than `goto err`. This same comment applies to the other calls to
`sensor_itf_lock()`.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services