Skip to contentSkip to conversation

spi: atmel: Put allocated master before return

PATCH In review Pan Bian 3 participants 3 messages Jan 20, 2021 – Jan 21, 2021

Subsystems (3)
lore
Share & tools
lore

Pan Bian

author
#0 lore raw

PATCH 1/1 spi: atmel: Put allocated master before return

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

Fixes 04242ca4e891 ("spi: atmel: Use SPI core DMA mapping framework")
---
 drivers/spi/spi-atmel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-atmel.c +1 -1
index 948396b382d7..f429436082af 100644
@@ -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;
Signature · 8 lines
2.17.1



_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Pan Bian

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:

Quoted 19 lines
---
 drivers/spi/spi-atmel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-atmel.c +1 -2
index 948396b382d7..f429436082af 100644
@@ -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;
--
Quoted 3 lines

2.17.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#2 lore raw
In reply to Pan Bian
Quoted 2 lines · Pan Bian

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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel