mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-10 07:55:21 +00:00
Fix a null pointer dereference in akm09918c_submit(), where writeByte_sqe was dereferenced before checking if it was NULL. Coverity reported this as CID 516247: the pointer returned by i2c_rtio_copy_reg_write_byte() may be NULL, and accessing its `flags` field before checking leads to undefined behavior. Move the access to writeByte_sqe->flags after confirming both writeByte_sqe and cb_sqe are valid. Fixes: CID 516247 Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com> |
||
---|---|---|
.. | ||
ak8975 | ||
akm09918c | ||
CMakeLists.txt | ||
Kconfig |