v01d commented on a change in pull request #2315: URL: https://github.com/apache/incubator-nuttx/pull/2315#discussion_r526108626
########## File path: drivers/sensors/sensor.c ########## @@ -801,9 +654,9 @@ int sensor_register(FAR struct sensor_lowerhalf_s *lower, int devno) /* Initialize sensor buffer */ - ret = sensor_buffer_create(&upper->buffer, - lower->type, lower->buffer_size); - if (ret) + bytes = ROUNDUP(lower->buffer_size, g_sensor_info[lower->type].esize); Review comment: Ok, I was confused with the purpose of ROUNDUP. I assumed it would return `g_sensor_info[lower->type].esize` in that case. If it returns 0 it is OK. ---------------------------------------------------------------- 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