linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: mxic: Fix an error handling path in mxic_spi_probe()
@ 2022-04-03 10:11 Christophe JAILLET
  2022-04-04  7:41 ` Miquel Raynal
  2022-04-05  9:32 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2022-04-03 10:11 UTC (permalink / raw)
  To: Mark Brown, Miquel Raynal
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-spi

If spi_register_master() fails, we must undo a previous
mxic_spi_mem_ecc_probe() call, as already done in the remove function.

Fixes: 00360ebae483 ("spi: mxic: Add support for pipelined ECC operations")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/spi/spi-mxic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c
index 55c092069301..65be8e085ab8 100644
--- a/drivers/spi/spi-mxic.c
+++ b/drivers/spi/spi-mxic.c
@@ -813,6 +813,7 @@ static int mxic_spi_probe(struct platform_device *pdev)
 	if (ret) {
 		dev_err(&pdev->dev, "spi_register_master failed\n");
 		pm_runtime_disable(&pdev->dev);
+		mxic_spi_mem_ecc_remove(mxic);
 	}
 
 	return ret;
-- 
2.32.0


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

* Re: [PATCH] spi: mxic: Fix an error handling path in mxic_spi_probe()
  2022-04-03 10:11 [PATCH] spi: mxic: Fix an error handling path in mxic_spi_probe() Christophe JAILLET
@ 2022-04-04  7:41 ` Miquel Raynal
  2022-04-05  9:32 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2022-04-04  7:41 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: Mark Brown, linux-kernel, kernel-janitors, linux-spi

Hi Christophe,

christophe.jaillet@wanadoo.fr wrote on Sun,  3 Apr 2022 12:11:13 +0200:

> If spi_register_master() fails, we must undo a previous
> mxic_spi_mem_ecc_probe() call, as already done in the remove function.
> 
> Fixes: 00360ebae483 ("spi: mxic: Add support for pipelined ECC operations")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/spi/spi-mxic.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c
> index 55c092069301..65be8e085ab8 100644
> --- a/drivers/spi/spi-mxic.c
> +++ b/drivers/spi/spi-mxic.c
> @@ -813,6 +813,7 @@ static int mxic_spi_probe(struct platform_device *pdev)
>  	if (ret) {
>  		dev_err(&pdev->dev, "spi_register_master failed\n");
>  		pm_runtime_disable(&pdev->dev);
> +		mxic_spi_mem_ecc_remove(mxic);

I missed it, thanks!

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

Cheers,
Miquèl

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

* Re: [PATCH] spi: mxic: Fix an error handling path in mxic_spi_probe()
  2022-04-03 10:11 [PATCH] spi: mxic: Fix an error handling path in mxic_spi_probe() Christophe JAILLET
  2022-04-04  7:41 ` Miquel Raynal
@ 2022-04-05  9:32 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-04-05  9:32 UTC (permalink / raw)
  To: miquel.raynal, christophe.jaillet
  Cc: linux-kernel, linux-spi, kernel-janitors

On Sun, 3 Apr 2022 12:11:13 +0200, Christophe JAILLET wrote:
> If spi_register_master() fails, we must undo a previous
> mxic_spi_mem_ecc_probe() call, 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: mxic: Fix an error handling path in mxic_spi_probe()
      commit: 35d516bdcd92fde46202d06b68df1166760208fd

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

end of thread, other threads:[~2022-04-05 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 10:11 [PATCH] spi: mxic: Fix an error handling path in mxic_spi_probe() Christophe JAILLET
2022-04-04  7:41 ` Miquel Raynal
2022-04-05  9:32 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).