drivers/spi/spi-microchip-core-spi.c | 1 + 1 file changed, 1 insertion(+)
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@wanadoo.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
On Fri, 05 Dec 2025 22:14:10 +0100, Christophe JAILLET wrote:
> 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.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: microchip-core: Fix an error handling path in mchp_corespi_probe()
commit: 8cef9b451dc6fdf86b92c7a35d55a47465d500db
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
On Fri, Dec 05, 2025 at 10:14:10PM +0100, Christophe JAILLET wrote:
> 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@wanadoo.fr>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
© 2016 - 2025 Red Hat, Inc.