diff options
author | Jinjie Ruan <ruanjinjie@huawei.com> | 2024-09-09 15:31:40 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-09-09 12:57:33 +0100 |
commit | b787a33864121a565aeb0e88561bf6062a19f99c (patch) | |
tree | fae2e99999452b8bd8f78ed3cf956cef5ff012f4 /drivers/spi/spi-geni-qcom.c | |
parent | 89e362c883c65ff94b76b9862285f63545fb5274 (diff) | |
download | lwn-b787a33864121a565aeb0e88561bf6062a19f99c.tar.gz lwn-b787a33864121a565aeb0e88561bf6062a19f99c.zip |
spi: geni-qcom: Fix incorrect free_irq() sequence
In spi_geni_remove(), the free_irq() sequence is different from that
on the probe error path. And the IRQ will still remain and it's interrupt
handler may use the dma channel after release dma channel and before free
irq, which is not secure, fix it.
Fixes: b59c122484ec ("spi: spi-geni-qcom: Add support for GPI dma")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240909073141.951494-3-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-geni-qcom.c')
-rw-r--r-- | drivers/spi/spi-geni-qcom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c index fef522fece1b..6f4057330444 100644 --- a/drivers/spi/spi-geni-qcom.c +++ b/drivers/spi/spi-geni-qcom.c @@ -1170,9 +1170,9 @@ static void spi_geni_remove(struct platform_device *pdev) /* Unregister _before_ disabling pm_runtime() so we stop transfers */ spi_unregister_controller(spi); - spi_geni_release_dma_chan(mas); - free_irq(mas->irq, spi); + + spi_geni_release_dma_chan(mas); } static int __maybe_unused spi_geni_runtime_suspend(struct device *dev) |