Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rayagonda Kokatanur and committed by
Jassi Brar
64d0da51 25831c44

+2
+2
drivers/mailbox/bcm-flexrm-mailbox.c
··· 1599 1599 1 << RING_CMPL_ALIGN_ORDER, 0); 1600 1600 if (!mbox->cmpl_pool) { 1601 1601 ret = -ENOMEM; 1602 + goto fail_destroy_bd_pool; 1602 1603 } 1603 1604 1604 1605 /* Allocate platform MSIs for each ring */ ··· 1662 1661 platform_msi_domain_free_irqs(dev); 1663 1662 fail_destroy_cmpl_pool: 1664 1663 dma_pool_destroy(mbox->cmpl_pool); 1664 + fail_destroy_bd_pool: 1665 1665 dma_pool_destroy(mbox->bd_pool); 1666 1666 fail: 1667 1667 return ret;