]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: amlogic-spisg: initialize completion before requesting IRQ
authorFelix Gu <ustc.gu@gmail.com>
Mon, 27 Apr 2026 17:42:00 +0000 (01:42 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 28 Apr 2026 00:57:15 +0000 (09:57 +0900)
commit8d0189c1ea98b56481eb809e3d1bdbf85557e819
treed6f2d941f86ebb98cfe5cb3c97e0a0139ab7072f
parentf5c6a272b699b9a0698535e1a56e683207e50030
spi: amlogic-spisg: initialize completion before requesting IRQ

Move init_completion(&spisg->completion) to before devm_request_irq()
to avoid a potential race condition where an interrupt could fire
before the completion structure is initialized.

Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260428-amlogic-spisg-v1-1-8eecc3b446d6@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-amlogic-spisg.c