diff options
| author | Pei Xiao <xiaopei01@kylinos.cn> | 2026-03-12 10:47:55 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-12 11:28:31 +0000 |
| commit | 869d5b4b2a8012f6ef6058a1055cac6922c2cb55 (patch) | |
| tree | 42a2ca130e8676defe2767a5b46106d86869b967 /tools/perf/scripts/python | |
| parent | 97545e37234fdbe457f5104a09f55033550b3d84 (diff) | |
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 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
