summaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgbe/base/t4_hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cxgbe/base/t4_hw.c')
-rw-r--r--drivers/net/cxgbe/base/t4_hw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index c089b068..9dca8da1 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -359,6 +359,9 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
struct mbox_entry entry;
u32 pcie_fw = 0;
+ if (!temp)
+ return -ENOMEM;
+
if ((size & 15) || size > MBOX_LEN) {
free(temp);
return -EINVAL;