projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c80b0c2
)
cxgb3: Fix potential msi-x vector leak
author
Divy Le Ray
<divy@chelsio.com>
Fri, 17 Apr 2009 12:21:22 +0000
(12:21 +0000)
committer
David S. Miller
<davem@davemloft.net>
Mon, 20 Apr 2009 09:07:25 +0000
(
02:07
-0700)
Release vectors when a MSI-X allocation fails.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cxgb3/cxgb3_main.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/cxgb3/cxgb3_main.c
b/drivers/net/cxgb3/cxgb3_main.c
index 99b5032afda647a6ec9991debe792699c53aa194..cbd59fe618a98c2a88953d9dc73a737864fe3129 100644
(file)
--- 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)
while ((err = pci_enable_msix(adap->pdev, entries, vectors)) > 0)
vectors = err;
- if (!err && vectors < (adap->params.nports + 1))
+ if (err < 0)
+ pci_disable_msix(adap->pdev);
+
+ if (!err && vectors < (adap->params.nports + 1)) {
+ pci_disable_msix(adap->pdev);
err = -1;
+ }
if (!err) {
for (i = 0; i < vectors; ++i)