All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] spi: atmel: Put allocated master before return
@ 2021-01-20  5:00 Pan Bian
  2021-01-21 12:00   ` Tudor.Ambarus
  2021-01-21 19:41   ` Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Pan Bian @ 2021-01-20  5:00 UTC (permalink / raw)
  To: Tudor Ambarus, Mark Brown, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Cyrille Pitchen
  Cc: Pan Bian, linux-kernel, linux-arm-kernel, linux-spi

The allocated master is not released. Goto error handling label rather
than directly return.

Fixes: 04242ca4e891 ("spi: atmel: Use SPI core DMA mapping framework")
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
 drivers/spi/spi-atmel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 948396b382d7..f429436082af 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1590,7 +1590,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
 		if (ret == 0) {
 			as->use_dma = true;
 		} else if (ret == -EPROBE_DEFER) {
-			return ret;
+			goto out_unmap_regs;
 		}
 	} else if (as->caps.has_pdc_support) {
 		as->use_pdc = true;
-- 
2.17.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/1] spi: atmel: Put allocated master before return
  2021-01-20  5:00 [PATCH 1/1] spi: atmel: Put allocated master before return Pan Bian
@ 2021-01-21 12:00   ` Tudor.Ambarus
  2021-01-21 19:41   ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Tudor.Ambarus @ 2021-01-21 12:00 UTC (permalink / raw)
  To: bianpan2016, broonie, Nicolas.Ferre, alexandre.belloni,
	Ludovic.Desroches, cyrille.pitchen
  Cc: linux-spi, linux-arm-kernel, linux-kernel

On 1/20/21 7:00 AM, Pan Bian wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The allocated master is not released. Goto error handling label rather
> than directly return.
> 
> Fixes: 04242ca4e891 ("spi: atmel: Use SPI core DMA mapping framework")
The correct fixes tag is:
Fixes: 5e9af37e46bc ("spi: atmel: introduce probe deferring")

With this addressed, one can add:
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> Signed-off-by: Pan Bian <bianpan2016@163.com>
> ---
>  drivers/spi/spi-atmel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> index 948396b382d7..f429436082af 100644
> --- a/drivers/spi/spi-atmel.c
> +++ b/drivers/spi/spi-atmel.c
> @@ -1590,7 +1590,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
>                 if (ret == 0) {
>                         as->use_dma = true;
>                 } else if (ret == -EPROBE_DEFER) {
> -                       return ret;
> +                       goto out_unmap_regs;
>                 }
>         } else if (as->caps.has_pdc_support) {
>                 as->use_pdc = true;
> --
> 2.17.1
> 
> 


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

* Re: [PATCH 1/1] spi: atmel: Put allocated master before return
@ 2021-01-21 12:00   ` Tudor.Ambarus
  0 siblings, 0 replies; 5+ messages in thread
From: Tudor.Ambarus @ 2021-01-21 12:00 UTC (permalink / raw)
  To: bianpan2016, broonie, Nicolas.Ferre, alexandre.belloni,
	Ludovic.Desroches, cyrille.pitchen
  Cc: linux-kernel, linux-arm-kernel, linux-spi

On 1/20/21 7:00 AM, Pan Bian wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The allocated master is not released. Goto error handling label rather
> than directly return.
> 
> Fixes: 04242ca4e891 ("spi: atmel: Use SPI core DMA mapping framework")
The correct fixes tag is:
Fixes: 5e9af37e46bc ("spi: atmel: introduce probe deferring")

With this addressed, one can add:
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> Signed-off-by: Pan Bian <bianpan2016@163.com>
> ---
>  drivers/spi/spi-atmel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> index 948396b382d7..f429436082af 100644
> --- a/drivers/spi/spi-atmel.c
> +++ b/drivers/spi/spi-atmel.c
> @@ -1590,7 +1590,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
>                 if (ret == 0) {
>                         as->use_dma = true;
>                 } else if (ret == -EPROBE_DEFER) {
> -                       return ret;
> +                       goto out_unmap_regs;
>                 }
>         } else if (as->caps.has_pdc_support) {
>                 as->use_pdc = true;
> --
> 2.17.1
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/1] spi: atmel: Put allocated master before return
  2021-01-20  5:00 [PATCH 1/1] spi: atmel: Put allocated master before return Pan Bian
@ 2021-01-21 19:41   ` Mark Brown
  2021-01-21 19:41   ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2021-01-21 19:41 UTC (permalink / raw)
  To: Pan Bian, Alexandre Belloni, Ludovic Desroches, Cyrille Pitchen,
	Nicolas Ferre, Tudor Ambarus
  Cc: linux-spi, linux-arm-kernel, linux-kernel

On Tue, 19 Jan 2021 21:00:25 -0800, Pan Bian wrote:
> The allocated master is not released. Goto error handling label rather
> than directly return.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: atmel: Put allocated master before return
      commit: 21ea2743f015dbacec1831bdc8afc848db9c2b8c

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] 5+ messages in thread

* Re: [PATCH 1/1] spi: atmel: Put allocated master before return
@ 2021-01-21 19:41   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2021-01-21 19:41 UTC (permalink / raw)
  To: Pan Bian, Alexandre Belloni, Ludovic Desroches, Cyrille Pitchen,
	Nicolas Ferre, Tudor Ambarus
  Cc: linux-kernel, linux-arm-kernel, linux-spi

On Tue, 19 Jan 2021 21:00:25 -0800, Pan Bian wrote:
> The allocated master is not released. Goto error handling label rather
> than directly return.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: atmel: Put allocated master before return
      commit: 21ea2743f015dbacec1831bdc8afc848db9c2b8c

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-01-21 19:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20  5:00 [PATCH 1/1] spi: atmel: Put allocated master before return Pan Bian
2021-01-21 12:00 ` Tudor.Ambarus
2021-01-21 12:00   ` Tudor.Ambarus
2021-01-21 19:41 ` Mark Brown
2021-01-21 19:41   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.