Skip to content

Commit

Permalink
cxgb4: Fix an error code in cxgb4_mqprio_alloc_hw_resources()
Browse files Browse the repository at this point in the history
"ret" is zero or possibly uninitialized on this error path.  It
should be a negative error code instead.

Fixes: 2d0cb84 ("cxgb4: add ETHOFLD hardware queue support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Nov 13, 2019
1 parent d413787 commit 72c9960
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 72c9960

Please sign in to comment.