Skip to content

Commit 63542bb

Browse files
outman119broonie
authored andcommitted
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: 8311ee2 ("spi: meson-spicc: fix memory leak in meson_spicc_remove") Signed-off-by: Felix Gu <[email protected]> Reviewed-by: Johan Hovold <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a42c9b8 commit 63542bb

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/spi/spi-meson-spicc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,8 +1101,6 @@ static void meson_spicc_remove(struct platform_device *pdev)
11011101

11021102
/* Disable SPI */
11031103
writel(0, spicc->base + SPICC_CONREG);
1104-
1105-
spi_controller_put(spicc->host);
11061104
}
11071105

11081106
static const struct meson_spicc_data meson_spicc_gx_data = {

0 commit comments

Comments
 (0)