jerpelea opened a new pull request, #21199:
URL: https://github.com/apache/nuttx/pull/21199

   ## Summary
   
   The battery gauge upper half calls dev->ops->X() for every BATIOC_* command, 
but it checks only the argument pointer. The operations are optional: max1704x 
implements 4 of 8, and the fake gauge leaves chipid and operate NULL. A request 
for a missing method calls address 0. On ARM this is a hard fault (INVSTATE).
   
   This change checks each method pointer. A missing method now returns 
-ENOTTY, the same value as an unknown command.
   
   The first commit fixes older nxstyle errors in battery_gauge.c, because CI 
checks every file that a change touches. It changes whitespace only.
   
   ## Impact
   
   RELEASE
   
   ## Testing
   
   CI


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to