public inbox for linux-spi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: mpfs: Fix an error handling path in mpfs_spi_probe()
@ 2025-12-13  7:48 Christophe JAILLET
  2025-12-15 13:59 ` Mark Brown
  2025-12-31  3:31 ` patchwork-bot+linux-riscv
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2025-12-13  7:48 UTC (permalink / raw)
  To: Conor Dooley, Daire McNamara, Mark Brown
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-riscv,
	linux-spi

mpfs_spi_init() calls mpfs_spi_enable_ints(), so mpfs_spi_disable_ints()
should be called if an error occurs after calling mpfs_spi_init(), as
already done in the remove function.

Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
This patch is compile tested only.

This patch is similar to commit 8cef9b451dc6 but for another driver.
---
 drivers/spi/spi-mpfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-mpfs.c b/drivers/spi/spi-mpfs.c
index 9a14d1732a15..7e9e64d8e6c8 100644
--- a/drivers/spi/spi-mpfs.c
+++ b/drivers/spi/spi-mpfs.c
@@ -577,6 +577,7 @@ static int mpfs_spi_probe(struct platform_device *pdev)
 
 	ret = devm_spi_register_controller(&pdev->dev, host);
 	if (ret) {
+		mpfs_spi_disable_ints(spi);
 		mpfs_spi_disable(spi);
 		return dev_err_probe(&pdev->dev, ret,
 				     "unable to register host for SPI controller\n");
-- 
2.52.0


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

* Re: [PATCH] spi: mpfs: Fix an error handling path in mpfs_spi_probe()
  2025-12-13  7:48 [PATCH] spi: mpfs: Fix an error handling path in mpfs_spi_probe() Christophe JAILLET
@ 2025-12-15 13:59 ` Mark Brown
  2025-12-31  3:31 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2025-12-15 13:59 UTC (permalink / raw)
  To: Conor Dooley, Daire McNamara, Christophe JAILLET
  Cc: linux-kernel, kernel-janitors, linux-riscv, linux-spi

On Sat, 13 Dec 2025 08:48:51 +0100, Christophe JAILLET wrote:
> mpfs_spi_init() calls mpfs_spi_enable_ints(), so mpfs_spi_disable_ints()
> should be called if an error occurs after calling mpfs_spi_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: mpfs: Fix an error handling path in mpfs_spi_probe()
      commit: a8a313612af7a55083ba5720f14f1835319debee

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


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

* Re: [PATCH] spi: mpfs: Fix an error handling path in mpfs_spi_probe()
  2025-12-13  7:48 [PATCH] spi: mpfs: Fix an error handling path in mpfs_spi_probe() Christophe JAILLET
  2025-12-15 13:59 ` Mark Brown
@ 2025-12-31  3:31 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2025-12-31  3:31 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: linux-riscv, conor.dooley, daire.mcnamara, broonie, linux-kernel,
	kernel-janitors, linux-spi

Hello:

This patch was applied to riscv/linux.git (fixes)
by Mark Brown <broonie@kernel.org>:

On Sat, 13 Dec 2025 08:48:51 +0100 you wrote:
> mpfs_spi_init() calls mpfs_spi_enable_ints(), so mpfs_spi_disable_ints()
> should be called if an error occurs after calling mpfs_spi_init(), as
> already done in the remove function.
> 
> Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> [...]

Here is the summary with links:
  - spi: mpfs: Fix an error handling path in mpfs_spi_probe()
    https://git.kernel.org/riscv/c/a8a313612af7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-12-31  3:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-13  7:48 [PATCH] spi: mpfs: Fix an error handling path in mpfs_spi_probe() Christophe JAILLET
2025-12-15 13:59 ` Mark Brown
2025-12-31  3:31 ` patchwork-bot+linux-riscv

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