summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb3/sge.c
diff options
context:
space:
mode:
authorZhang Changzhong <zhangchangzhong@huawei.com>2020-12-02 12:56:05 +0300
committerJakub Kicinski <kuba@kernel.org>2020-12-03 05:03:53 +0300
commitff9924897f8bfed82e61894b373ab9d2dfea5b10 (patch)
treef4e5ae4104e4753efb695067213eda8c2990db47 /drivers/net/ethernet/chelsio/cxgb3/sge.c
parent6ee50c8e262a0f0693dad264c3c99e30e6442a56 (diff)
downloadlinux-ff9924897f8bfed82e61894b373ab9d2dfea5b10.tar.xz
cxgb3: fix error return code in t3_sge_alloc_qset()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: b1fb1f280d09 ("cxgb3 - Fix dma mapping error path") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Acked-by: Raju Rangoju <rajur@chelsio.com> Link: https://lore.kernel.org/r/1606902965-1646-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb3/sge.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/sge.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb3/sge.c b/drivers/net/ethernet/chelsio/cxgb3/sge.c
index e18e9ce27f94..1cc3c51eff71 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/sge.c
@@ -3175,6 +3175,7 @@ int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports,
GFP_KERNEL | __GFP_COMP);
if (!avail) {
CH_ALERT(adapter, "free list queue 0 initialization failed\n");
+ ret = -ENOMEM;
goto err;
}
if (avail < q->fl[0].size)