Unverified Commit 63542bb4 authored by Felix Gu's avatar Felix Gu Committed by Mark Brown
Browse files

spi: meson-spicc: Fix double-put in remove path



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: 8311ee21 ("spi: meson-spicc: fix memory leak in meson_spicc_remove")
Signed-off-by: default avatarFelix Gu <ustc.gu@gmail.com>
Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260322-rockchip-v1-1-fac3f0c6dad8@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a42c9b8b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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 = {