Commit 0b5b561c authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Return error if bnxt_alloc_ctx_mem() fails.

The current code ignores the return value from
bnxt_hwrm_func_backing_store_cfg(), causing the driver to proceed in
the init path even when this vital firmware call has failed.  Fix it
by propagating the error code to the caller.

Fixes: 1b9394e5 ("bnxt_en: Configure context memory on new devices.")
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 62d4073e
...@@ -6880,12 +6880,12 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp) ...@@ -6880,12 +6880,12 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp)
} }
ena |= FUNC_BACKING_STORE_CFG_REQ_DFLT_ENABLES; ena |= FUNC_BACKING_STORE_CFG_REQ_DFLT_ENABLES;
rc = bnxt_hwrm_func_backing_store_cfg(bp, ena); rc = bnxt_hwrm_func_backing_store_cfg(bp, ena);
if (rc) if (rc) {
netdev_err(bp->dev, "Failed configuring context mem, rc = %d.\n", netdev_err(bp->dev, "Failed configuring context mem, rc = %d.\n",
rc); rc);
else return rc;
ctx->flags |= BNXT_CTX_FLAG_INITED; }
ctx->flags |= BNXT_CTX_FLAG_INITED;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment