diff options
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 99b5032afda6..cbd59fe618a9 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -2917,8 +2917,13 @@ static int __devinit cxgb_enable_msix(struct adapter *adap) | |||
2917 | while ((err = pci_enable_msix(adap->pdev, entries, vectors)) > 0) | 2917 | while ((err = pci_enable_msix(adap->pdev, entries, vectors)) > 0) |
2918 | vectors = err; | 2918 | vectors = err; |
2919 | 2919 | ||
2920 | if (!err && vectors < (adap->params.nports + 1)) | 2920 | if (err < 0) |
2921 | pci_disable_msix(adap->pdev); | ||
2922 | |||
2923 | if (!err && vectors < (adap->params.nports + 1)) { | ||
2924 | pci_disable_msix(adap->pdev); | ||
2921 | err = -1; | 2925 | err = -1; |
2926 | } | ||
2922 | 2927 | ||
2923 | if (!err) { | 2928 | if (!err) { |
2924 | for (i = 0; i < vectors; ++i) | 2929 | for (i = 0; i < vectors; ++i) |