diff options
author | Pan Bian <bianpan2016@163.com> | 2021-01-19 21:00:25 -0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-01-21 18:14:28 +0000 |
commit | 21ea2743f015dbacec1831bdc8afc848db9c2b8c (patch) | |
tree | c52f5ce635471abf339434f27ecbfe9049e417cf /drivers/spi | |
parent | 258ea99fe25a5f761b16967afa93ed3101827e68 (diff) | |
download | linux-21ea2743f015dbacec1831bdc8afc848db9c2b8c.tar.bz2 |
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')
-rw-r--r-- | drivers/spi/spi-atmel.c | 2 |
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; |