Commit 64d0da51 authored by Rayagonda Kokatanur's avatar Rayagonda Kokatanur Committed by Jassi Brar

maillbox: bcm-flexrm-mailbox: handle cmpl_pool dma allocation failure

Handle 'cmpl_pool' dma memory allocation failure.

Fixes: a9a9da47 ("mailbox: no need to check return value of debugfs_create functions")
Signed-off-by: default avatarRayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: default avatarTyler Hicks <tyhicks@linux.microsoft.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 25831c44
......@@ -1599,6 +1599,7 @@ static int flexrm_mbox_probe(struct platform_device *pdev)
1 << RING_CMPL_ALIGN_ORDER, 0);
if (!mbox->cmpl_pool) {
ret = -ENOMEM;
goto fail_destroy_bd_pool;
}
/* Allocate platform MSIs for each ring */
......@@ -1661,6 +1662,7 @@ static int flexrm_mbox_probe(struct platform_device *pdev)
platform_msi_domain_free_irqs(dev);
fail_destroy_cmpl_pool:
dma_pool_destroy(mbox->cmpl_pool);
fail_destroy_bd_pool:
dma_pool_destroy(mbox->bd_pool);
fail:
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment