summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPei Xiao <xiaopei01@kylinos.cn>2026-03-12 05:47:55 +0300
committerMark Brown <broonie@kernel.org>2026-03-12 14:28:31 +0300
commit869d5b4b2a8012f6ef6058a1055cac6922c2cb55 (patch)
tree42a2ca130e8676defe2767a5b46106d86869b967 /include
parent97545e37234fdbe457f5104a09f55033550b3d84 (diff)
downloadlinux-869d5b4b2a8012f6ef6058a1055cac6922c2cb55.tar.xz
spi: atcspi200: fix mutex initialization order
The atcspi_exec_mem_op() function may call mutex_lock() on the driver's mutex before it is properly initialized if a SPI memory operation is initiated immediately after devm_spi_register_controller() is called. The mutex initialization currently occurs after the controller registration, which leaves a window where the mutex could be used uninitialized. Move the mutex initialization to the beginning of the probe function, before any registration or resource allocation. Fixes: 34e3815ea459 ("spi: atcspi200: Add ATCSPI200 SPI controller driver") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://patch.msgid.link/15a71241affc25108a97d40d9d3dd1bc3d2d69ed.1773282905.git.xiaopei01@kylinos.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions