xiaoxiang781216 commented on code in PR #6965: URL: https://github.com/apache/incubator-nuttx/pull/6965#discussion_r996460258
########## drivers/sensors/qencoder.c: ########## @@ -409,7 +409,7 @@ int qe_register(FAR const char *devpath, FAR struct qe_lowerhalf_s *lower) * (it was already zeroed by kmm_zalloc()) */ - nxsem_init(&upper->exclsem, 0, 1); + nxmutex_init(&upper->lock); Review Comment: I prefer that: 1. Keep ignore the error may be returned by register_driver if the origin code doesn't check it 2. Call nxmutex_destroy if the origin code free memory in case register_driver return fail -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org