public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] spi: meson-spicc: Fix double-put in remove path
@ 2026-03-22 13:29 Felix Gu
  2026-03-22 15:40 ` Markus Elfring
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Felix Gu @ 2026-03-22 13:29 UTC (permalink / raw)
  To: Mark Brown, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Dongliang Mu
  Cc: linux-spi, linux-arm-kernel, linux-amlogic, linux-kernel,
	Felix Gu

meson_spicc_probe() registers the controller with
devm_spi_register_controller(), so teardown already drops the
controller reference via devm cleanup.

Calling spi_controller_put() again in meson_spicc_remove()
causes a double-put.

Fixes: 8311ee2164c5 ("spi: meson-spicc: fix memory leak in meson_spicc_remove")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-meson-spicc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
index a7001b9e36e6..57768da3205d 100644
--- a/drivers/spi/spi-meson-spicc.c
+++ b/drivers/spi/spi-meson-spicc.c
@@ -1101,8 +1101,6 @@ static void meson_spicc_remove(struct platform_device *pdev)
 
 	/* Disable SPI */
 	writel(0, spicc->base + SPICC_CONREG);
-
-	spi_controller_put(spicc->host);
 }
 
 static const struct meson_spicc_data meson_spicc_gx_data = {

---
base-commit: 785f0eb2f85decbe7c1ef9ae922931f0194ffc2e
change-id: 20260322-rockchip-2a6021826137

Best regards,
-- 
Felix Gu <ustc.gu@gmail.com>



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-24  0:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-22 13:29 [PATCH] spi: meson-spicc: Fix double-put in remove path Felix Gu
2026-03-22 15:40 ` Markus Elfring
2026-03-23 10:55 ` Johan Hovold
2026-03-23 11:33   ` Felix Gu
2026-03-23 18:44     ` Markus Elfring
2026-03-23 18:47       ` Mark Brown
2026-03-23 18:32 ` [PATCH] " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox