FASTSHIFT opened a new pull request, #21585:
URL: https://github.com/apache/nuttx/pull/21585
## Summary
Two small fixes for the MIPI DSI driver:
1. `drivers/video/mipidsi: Include nuttx/mutex.h for nxmutex_lock`
`mipi_dsi_host_driver.c` and `mipi_dsi_device_driver.c` call
`nxmutex_lock()` without including `nuttx/mutex.h`, which produces an
implicit declaration warning. Add the include.
2. `video/mipidsi: keep the old host array when realloc fails`
`mipi_dsi_host_register()` assigned the result of `kmm_realloc()`
straight back to `g_hosts`. On failure this set `g_hosts` to NULL and
leaked the existing host array. Use a temporary pointer and return
`-ENOMEM`, leaving `g_hosts` intact.
## Impact
- Only `drivers/video/mipidsi` is affected.
- The first fix removes a build warning. The second only changes the
allocation-failure path.
- No Kconfig, API, or documentation changes.
## Testing
- Host: `<OS / toolchain>`
- Target: `<board:config with CONFIG_MIPI_DSI enabled>`
- Build with the above config; confirm the `nxmutex_lock` warning is gone.
- Register a MIPI DSI host and confirm normal registration still works.
The `realloc` failure path was verified by code inspection only, unless
you inject a failure.
--
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]