summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-atmel.c
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2021-01-20 06:00:25 +0100
committerMark Brown <broonie@kernel.org>2021-01-21 19:14:28 +0100
commit21ea2743f015dbacec1831bdc8afc848db9c2b8c (patch)
treec52f5ce635471abf339434f27ecbfe9049e417cf /drivers/spi/spi-atmel.c
parentspi: spi-mpc52xx: Use new structure for SPI transfer delays (diff)
downloadlinux-21ea2743f015dbacec1831bdc8afc848db9c2b8c.tar.xz
linux-21ea2743f015dbacec1831bdc8afc848db9c2b8c.zip
spi: atmel: Put allocated master before return
The allocated master is not released. Goto error handling label rather than directly return. Fixes: 5e9af37e46bc ("spi: atmel: introduce probe deferring") Signed-off-by: Pan Bian <bianpan2016@163.com> Fixes: 5e9af37e46bc ("spi: atmel: introduce probe deferring") Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com> Link: https://lore.kernel.org/r/20210120050025.25426-1-bianpan2016@163.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-atmel.c')
-rw-r--r--drivers/spi/spi-atmel.c2
1 files changed, 1 insertions, 1 deletions
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;