diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
| commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
| tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /drivers/net/wireless/hostap/hostap_plx.c | |
| parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
| parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) | |
Merge branch 'linus'
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_plx.c')
| -rw-r--r-- | drivers/net/wireless/hostap/hostap_plx.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index 94fe2449f099..edaaa943eb8f 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c | |||
| @@ -368,7 +368,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
| 368 | 368 | ||
| 369 | switch (cis[pos]) { | 369 | switch (cis[pos]) { |
| 370 | case CISTPL_CONFIG: | 370 | case CISTPL_CONFIG: |
| 371 | if (cis[pos + 1] < 1) | 371 | if (cis[pos + 1] < 2) |
| 372 | goto cis_error; | 372 | goto cis_error; |
| 373 | rmsz = (cis[pos + 2] & 0x3c) >> 2; | 373 | rmsz = (cis[pos + 2] & 0x3c) >> 2; |
| 374 | rasz = cis[pos + 2] & 0x03; | 374 | rasz = cis[pos + 2] & 0x03; |
| @@ -390,7 +390,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
| 390 | break; | 390 | break; |
| 391 | 391 | ||
| 392 | case CISTPL_MANFID: | 392 | case CISTPL_MANFID: |
| 393 | if (cis[pos + 1] < 4) | 393 | if (cis[pos + 1] < 5) |
| 394 | goto cis_error; | 394 | goto cis_error; |
| 395 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); | 395 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); |
| 396 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); | 396 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); |
| @@ -452,7 +452,7 @@ static int prism2_plx_probe(struct pci_dev *pdev, | |||
| 452 | memset(hw_priv, 0, sizeof(*hw_priv)); | 452 | memset(hw_priv, 0, sizeof(*hw_priv)); |
| 453 | 453 | ||
| 454 | if (pci_enable_device(pdev)) | 454 | if (pci_enable_device(pdev)) |
| 455 | return -EIO; | 455 | goto err_out_free; |
| 456 | 456 | ||
| 457 | /* National Datacomm NCP130 based on TMD7160, not PLX9052. */ | 457 | /* National Datacomm NCP130 based on TMD7160, not PLX9052. */ |
| 458 | tmd7160 = (pdev->vendor == 0x15e8) && (pdev->device == 0x0131); | 458 | tmd7160 = (pdev->vendor == 0x15e8) && (pdev->device == 0x0131); |
| @@ -567,9 +567,6 @@ static int prism2_plx_probe(struct pci_dev *pdev, | |||
| 567 | return hostap_hw_ready(dev); | 567 | return hostap_hw_ready(dev); |
| 568 | 568 | ||
| 569 | fail: | 569 | fail: |
| 570 | prism2_free_local_data(dev); | ||
| 571 | kfree(hw_priv); | ||
| 572 | |||
| 573 | if (irq_registered && dev) | 570 | if (irq_registered && dev) |
| 574 | free_irq(dev->irq, dev); | 571 | free_irq(dev->irq, dev); |
| 575 | 572 | ||
| @@ -577,6 +574,10 @@ static int prism2_plx_probe(struct pci_dev *pdev, | |||
| 577 | iounmap(attr_mem); | 574 | iounmap(attr_mem); |
| 578 | 575 | ||
| 579 | pci_disable_device(pdev); | 576 | pci_disable_device(pdev); |
| 577 | prism2_free_local_data(dev); | ||
| 578 | |||
| 579 | err_out_free: | ||
| 580 | kfree(hw_priv); | ||
| 580 | 581 | ||
| 581 | return -ENODEV; | 582 | return -ENODEV; |
| 582 | } | 583 | } |
