mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: microchip-core: Fix an error handling path in mchp_corespi_probe()
@ 2025-12-05 21:14 Christophe JAILLET
  2025-12-08 16:23 ` Conor Dooley
  2025-12-09 10:21 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2025-12-05 21:14 UTC (permalink / raw)
  To: Mark Brown, Conor Dooley, Prajna Rajendra Kumar
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-spi

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-09 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-05 21:14 [PATCH] spi: microchip-core: Fix an error handling path in mchp_corespi_probe() Christophe JAILLET
2025-12-08 16:23 ` Conor Dooley
2025-12-09 10:21 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®