summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2021-01-19 21:00:25 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 11:37:59 +0100
commitac5ab9c02951426e25e87a272d9bb43df6d48c65 (patch)
treea727291b1f493a503cdb18fb2d0f6eab514a92c3
parent1303992207e8a9cea7b210435a1fa3dbfc4f3753 (diff)
spi: atmel: Put allocated master before return
[ Upstream commit 21ea2743f015dbacec1831bdc8afc848db9c2b8c ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 0e5e64a80848..1db43cbead57 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;