From 4ea8e1b341e102c7a4253d978492ae97f1af37d4 Mon Sep 17 00:00:00 2001 From: Naman Padhiar Date: Mon, 24 May 2021 18:26:45 +0530 Subject: [PATCH] cnss2: Assert on FW mem allocation failure Add code to assert if FW requested memory allocation fails. This helps to collect logs at the time of failure. Change-Id: I8d3ff82eee545510318e0a9a2a128a71dc8a9fb3 Signed-off-by: Naman Padhiar Signed-off-by: Mohammed Siddiq --- drivers/net/wireless/cnss2/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/cnss2/pci.c b/drivers/net/wireless/cnss2/pci.c index 624bd8470989..383b50286350 100644 --- a/drivers/net/wireless/cnss2/pci.c +++ b/drivers/net/wireless/cnss2/pci.c @@ -3909,8 +3909,7 @@ int cnss_pci_alloc_fw_mem(struct cnss_pci_data *pci_priv) if (!fw_mem[i].va) { cnss_pr_err("Failed to allocate memory for FW, size: 0x%zx, type: %u\n", fw_mem[i].size, fw_mem[i].type); - - return -ENOMEM; + BUG(); } } }