未验证 提交 21ea2743 编写于 作者: P Pan Bian 提交者: Mark Brown

spi: atmel: Put allocated master before return

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

Fixes: 5e9af37e ("spi: atmel: introduce probe deferring")
Signed-off-by: NPan Bian <bianpan2016@163.com>
Fixes: 5e9af37e ("spi: atmel: introduce probe deferring")
Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20210120050025.25426-1-bianpan2016@163.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 258ea99f
...@@ -1590,7 +1590,7 @@ static int atmel_spi_probe(struct platform_device *pdev) ...@@ -1590,7 +1590,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
if (ret == 0) { if (ret == 0) {
as->use_dma = true; as->use_dma = true;
} else if (ret == -EPROBE_DEFER) { } else if (ret == -EPROBE_DEFER) {
return ret; goto out_unmap_regs;
} }
} else if (as->caps.has_pdc_support) { } else if (as->caps.has_pdc_support) {
as->use_pdc = true; as->use_pdc = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册