[dpdk-dev,4/8] net/qede/base: fix error return code in resc alloc
Checks
Commit Message
Fix to return error code ECORE_INVAL instead of 0 when EQ elements
is too large as done elsewhere in this function.
Fixes: 22d07d93 ("net/qede/base: update")
Signed-off-by: Rasesh Mody <Rasesh.Mody@cavium.com>
---
drivers/net/qede/base/ecore_dev.c | 1 +
1 file changed, 1 insertion(+)
@@ -667,6 +667,7 @@ enum _ecore_status_t ecore_resc_alloc(struct ecore_dev *p_dev)
DP_ERR(p_hwfn, "Cannot allocate 0x%x EQ elements."
"The maximum of a u16 chain is 0x%x\n",
n_eqes, 0xFFFF);
+ rc = ECORE_INVAL;
goto alloc_err;
}