Commit 72c99609 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

cxgb4: Fix an error code in cxgb4_mqprio_alloc_hw_resources()

"ret" is zero or possibly uninitialized on this error path.  It
should be a negative error code instead.

Fixes: 2d0cb84d ("cxgb4: add ETHOFLD hardware queue support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d4137871
......@@ -158,8 +158,10 @@ static int cxgb4_mqprio_alloc_hw_resources(struct net_device *dev)
/* Allocate Rxqs for receiving ETHOFLD Tx completions */
if (msix >= 0) {
msix = cxgb4_get_msix_idx_from_bmap(adap);
if (msix < 0)
if (msix < 0) {
ret = msix;
goto out_free_queues;
}
eorxq->msix = &adap->msix_info[msix];
snprintf(eorxq->msix->desc,
......
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