Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Felix Gu and committed by
Mark Brown
8d0189c1 f5c6a272

+1 -2
+1 -2
drivers/spi/spi-amlogic-spisg.c
··· 794 794 795 795 dma_set_max_seg_size(&pdev->dev, SPISG_BLOCK_MAX); 796 796 797 + init_completion(&spisg->completion); 797 798 ret = devm_request_irq(&pdev->dev, irq, aml_spisg_irq, 0, NULL, spisg); 798 799 if (ret) { 799 800 dev_err(&pdev->dev, "irq request failed\n"); ··· 806 805 dev_err(&pdev->dev, "spi controller registration failed\n"); 807 806 goto out_clk; 808 807 } 809 - 810 - init_completion(&spisg->completion); 811 808 812 809 pm_runtime_put(&spisg->pdev->dev); 813 810