summaryrefslogtreecommitdiff
path: root/drivers/mailbox
diff options
context:
space:
mode:
authorRayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>2020-03-18 09:00:55 +0530
committerJassi Brar <jaswinder.singh@linaro.org>2020-03-19 23:00:32 -0500
commit64d0da512b5ab856c25b59e692c5fa8feb93e62d (patch)
tree4c24d0b686764842923832e2385edfd6fd97afb7 /drivers/mailbox
parent25831c44b0b79ac6261d36d7e777a52bdf92f239 (diff)
maillbox: bcm-flexrm-mailbox: handle cmpl_pool dma allocation failure
Handle 'cmpl_pool' dma memory allocation failure. Fixes: a9a9da47f8e6 ("mailbox: no need to check return value of debugfs_create functions") Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Reviewed-by: Tyler Hicks <tyhicks@linux.microsoft.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r--drivers/mailbox/bcm-flexrm-mailbox.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-flexrm-mailbox.c
index 8ee9db274802..bee33abb5308 100644
--- a/drivers/mailbox/bcm-flexrm-mailbox.c
+++ b/drivers/mailbox/bcm-flexrm-mailbox.c
@@ -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 @@ fail_free_debugfs_root:
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;