[<prev] [next>] [day] [month] [year] [list]
Message-ID: <a7aaff1f28a83303a288de2914724a874fe1a11e.1764969247.git.christophe.jaillet@wanadoo.fr>
Date: Fri, 5 Dec 2025 22:14:10 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Mark Brown <broonie@...nel.org>,
Conor Dooley <conor.dooley@...rochip.com>,
Prajna Rajendra Kumar <prajna.rajendrakumar@...rochip.com>
Cc: linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-spi@...r.kernel.org
Subject: [PATCH] spi: microchip-core: Fix an error handling path in mchp_corespi_probe()
mchp_corespi_init() calls mchp_corespi_enable_ints(), so
mchp_corespi_disable_ints() should be called if an error occurs after
calling mchp_corespi_init(), as already done in the remove function.
Fixes: 059f545832be ("spi: add support for microchip "soft" spi controller")
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
This patch is compile tested only.
---
drivers/spi/spi-microchip-core-spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-microchip-core-spi.c b/drivers/spi/spi-microchip-core-spi.c
index 98bf0e6cd00e..89e40fc45d73 100644
--- a/drivers/spi/spi-microchip-core-spi.c
+++ b/drivers/spi/spi-microchip-core-spi.c
@@ -387,6 +387,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
ret = devm_spi_register_controller(dev, host);
if (ret) {
+ mchp_corespi_disable_ints(spi);
mchp_corespi_disable(spi);
return dev_err_probe(dev, ret, "unable to register host for CoreSPI controller\n");
}
--
2.52.0
Powered by blists - more mailing lists