[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <a90bec10dec43719b12afdb967e87526c4bc849a.1654933052.git.christophe.jaillet@wanadoo.fr>
Date: Sat, 11 Jun 2022 09:37:46 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Lewis Hanly <lewis.hanly@...rochip.com>,
Conor Dooley <conor.dooley@...rochip.com>,
Mark Brown <broonie@...nel.org>,
Daire McNamara <daire.mcnamara@...rochip.com>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-riscv@...ts.infradead.org, linux-spi@...r.kernel.org
Subject: [PATCH] spi: microchip-core: Fix the error handling path in mchp_corespi_probe()
clk_prepare_enable() is called instead of clk_disable_unprepare() in the
error handling path of the probe function.
Change the function that is called so that resources are released
correctly.
Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers")
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
drivers/spi/spi-microchip-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
index 5b2aee30fa04..bf6847d95fe3 100644
--- a/drivers/spi/spi-microchip-core.c
+++ b/drivers/spi/spi-microchip-core.c
@@ -580,7 +580,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
error_release_hardware:
mchp_corespi_disable(spi);
- clk_prepare_enable(spi->clk);
+ clk_disable_unprepare(spi->clk);
error_release_master:
spi_master_put(master);
--
2.34.1
Powered by blists - more mailing lists