diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-11-13 21:25:48 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-13 14:33:25 -0800 |
commit | 72c996099dc6fd83947a79cdac05625c6a52ffa6 (patch) | |
tree | 75a40c627fac6b4a2abae979766046fe84adc085 /drivers/net/ethernet/chelsio | |
parent | d41378713eef6a7d9d9c30cb9a6181ad72f69596 (diff) | |
download | linux-72c996099dc6fd83947a79cdac05625c6a52ffa6.tar.bz2 |
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: 2d0cb84dd973 ("cxgb4: add ETHOFLD hardware queue support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c index 388078488fb5..ce442c63f496 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c @@ -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, |