1
0
Fork 0

spi: atmel: Put allocated master before return

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

Fixes: 5e9af37e46 ("spi: atmel: introduce probe deferring")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Fixes: 5e9af37e46 ("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>
master
Pan Bian 2021-01-19 21:00:25 -08:00 committed by Mark Brown
parent 258ea99fe2
commit 21ea2743f0
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

@ -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;