xiaoxiang781216 commented on a change in pull request #3487: URL: https://github.com/apache/incubator-nuttx/pull/3487#discussion_r612674752
########## File path: drivers/1wire/1wire.c ########## @@ -554,6 +562,7 @@ int onewire_search(FAR struct onewire_master_s *master, nslaves_match++; } + onewire_sem_post(master); return (ret < 0) ? ret : nslaves_match; Review comment: remove line 565 and change line 566 to: goto err_unlock; ########## File path: drivers/1wire/1wire.c ########## @@ -554,6 +562,7 @@ int onewire_search(FAR struct onewire_master_s *master, nslaves_match++; } + onewire_sem_post(master); return (ret < 0) ? ret : nslaves_match; Review comment: remove line 565 and change line 566 to: goto err_unlock; ########## File path: drivers/1wire/1wire.c ########## @@ -668,7 +677,11 @@ int onewire_search(FAR struct onewire_master_s *master, */ } + onewire_sem_post(master); return nslaves_match; +err_unlock: + onewire_sem_post(master); + return ret; Review comment: change to: unlock: onewire_sem_post(master); return ret < 0 ? ret : nslaves_match; -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org