Skip to content

Conversation

@decsny
Copy link
Member

@decsny decsny commented Mar 10, 2025

There are two bugs I saw while doing code analysis:

  1. The TX word formation for multi-byte words is wrong due to a typo that does not increment the byte pointer
  2. There is a resource leak of the spi context in the transceive function due to not releasing upon error

Fixes #86930

decsny added 2 commits March 10, 2025 10:28
For multi-byte word, there is clearly a bug in that the same byte is
written to each spot in the word instead of writing all the bytes
properly.

Signed-off-by: Declan Snyder <[email protected]>
There is a bug here clearly which is that if there is some error in the
transceive function, it returns without releasing the context.
This should be fixed by properly handling the errors with a context release
before returning.

Signed-off-by: Declan Snyder <[email protected]>
@decsny decsny added backport v4.1-branch Request backport to the v4.1-branch bug The issue is a bug, or the PR is fixing a bug labels Mar 11, 2025
@kartben kartben merged commit 4e1c4cd into zephyrproject-rtos:main Mar 14, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: SPI SPI bus backport v4.1-branch Request backport to the v4.1-branch bug The issue is a bug, or the PR is fixing a bug platform: NXP Drivers NXP Semiconductors, drivers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NXP LPSPI Multi byte word formation incorrect

7 participants