Thread (3 messages) 3 messages, 3 authors, 2021-01-21
STALE1962d LANDED

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

From: Pan Bian <hidden>
Date: 2021-01-20 05:03:42
Subsystem: microchip spi driver, spi subsystem, the rest · Maintainers: Ryan Wanner, Mark Brown, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help