cxgb3: fix error return code in t3_sge_alloc_qset()
[ Upstream commit5.4-rM2-2.2.x-imx-squashedff9924897f
] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes:b1fb1f280d
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
8bfe5b73b1
commit
dc469f4236
|
@ -3176,6 +3176,7 @@ int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports,
|
||||||
GFP_KERNEL | __GFP_COMP);
|
GFP_KERNEL | __GFP_COMP);
|
||||||
if (!avail) {
|
if (!avail) {
|
||||||
CH_ALERT(adapter, "free list queue 0 initialization failed\n");
|
CH_ALERT(adapter, "free list queue 0 initialization failed\n");
|
||||||
|
ret = -ENOMEM;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (avail < q->fl[0].size)
|
if (avail < q->fl[0].size)
|
||||||
|
|
Loading…
Reference in New Issue