From: Alexander Gordeev Date: Tue, 18 Feb 2014 10:07:57 +0000 (+0100) Subject: cxgb3: Remove superfluous call to pci_disable_msix() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=c0b2551681e8fac72c189c76e7ec8b19002048b3;p=openwrt%2Fstaging%2Fblogic.git cxgb3: Remove superfluous call to pci_disable_msix() There is no need to call pci_disable_msix() in case the previous call to pci_enable_msix() failed Signed-off-by: Alexander Gordeev Cc: Santosh Raspatur Cc: netdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c index 45d77334d7d9..b72d2ed9dad4 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c @@ -3097,9 +3097,6 @@ static int cxgb_enable_msix(struct adapter *adap) while ((err = pci_enable_msix(adap->pdev, entries, vectors)) > 0) vectors = err; - if (err < 0) - pci_disable_msix(adap->pdev); - if (!err && vectors < (adap->params.nports + 1)) { pci_disable_msix(adap->pdev); err = -1;