mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
media: stm32: dcmi: fix error handling on MDMA pool alloc failure
Properly return an error if of_gen_pool_get or gen_pool_dma_zalloc
fails during the chained DMA probing.
Fixes: 87ebce19aa ("media: stm32: dcmi: addition of DMA-MDMA chaining support")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
6962703102
commit
1bc5946763
|
|
@ -2050,6 +2050,7 @@ static int dcmi_probe(struct platform_device *pdev)
|
|||
dcmi->sram_pool = of_gen_pool_get(pdev->dev.of_node, "sram", 0);
|
||||
if (!dcmi->sram_pool) {
|
||||
dev_info(&pdev->dev, "No SRAM pool, can't use MDMA chaining\n");
|
||||
ret = -ENOMEM;
|
||||
goto err_dma_slave_config;
|
||||
}
|
||||
|
||||
|
|
@ -2061,6 +2062,7 @@ static int dcmi_probe(struct platform_device *pdev)
|
|||
&dcmi->sram_dma_buf);
|
||||
if (!dcmi->sram_buf) {
|
||||
dev_err(dcmi->dev, "Failed to allocate from SRAM\n");
|
||||
ret = -ENOMEM;
|
||||
goto err_dma_slave_config;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user