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 <npadhiar@codeaurora.org>
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
This commit is contained in:
Naman Padhiar 2021-05-24 18:26:45 +05:30 • committed by Gerrit - the friendly Code Review server
commit 4ea8e1b341

View file

@ -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();
}
}
}