diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-01-31 06:03:26 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-02-01 20:35:17 +0100 |
commit | d32a06f5434f5e0cdef8e88dc62d079d980088e1 (patch) | |
tree | 4dcb43f8dc58ab94af3bb06c8ef54d99c7535c2f /drivers/net/ethernet/qlogic/qed/qed_dev.c | |
parent | octeontx2-pf: Fix an IS_ERR() vs NULL bug (diff) | |
download | linux-d32a06f5434f5e0cdef8e88dc62d079d980088e1.tar.xz linux-d32a06f5434f5e0cdef8e88dc62d079d980088e1.zip |
qed: Fix a error code in qed_hw_init()
If the qed_fw_overlay_mem_alloc() then we should return -ENOMEM instead
of success.
Fixes: 30d5f85895fa ("qed: FW 8.42.2.0 Add fw overlay feature")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_dev.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_dev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c index 7912911337d4..03bdd2e26329 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_dev.c +++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c @@ -3114,6 +3114,7 @@ int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params) if (!p_hwfn->fw_overlay_mem) { DP_NOTICE(p_hwfn, "Failed to allocate fw overlay memory\n"); + rc = -ENOMEM; goto load_err; } |