diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:47:18 -0500 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:47:18 -0500 | 
| commit | 8755e568250ecd3149ecd3495d8070f3a5384f73 (patch) | |
| tree | 26e76b657020cd864b3e6fbfcee9ca86a96059c2 /drivers/net/tlan.c | |
| parent | e33f6635da037ed4d2634ee6bdf5c4d601946c18 (diff) | |
| parent | 655d2ce073f5927194dbc28d2bd3c062a4a3caac (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits)
  virtio net: fix oops on interface-up
  Fix PHY Lib support for gianfar and ucc_geth
  forcedeth: preserve registers
  forcedeth: phy status fix
  forcedeth: restart tx/rx
  ipvs: Make wrr "no available servers" error message rate-limited
  [PPPOL2TP]: Label unused warning when CONFIG_PROC_FS is not set.
  [NET_SCHED]: cls_flow: support classification based on VLAN tag
  [VLAN]: Constify skb argument to vlan_get_tag()
  [NET_SCHED]: cls_flow: fix key mask validity check
  [NET_SCHED]: em_meta: fix compile warning
  b43: Fix DMA for 30/32-bit DMA engines
  b43: fix build with CONFIG_SSB_PCIHOST=n
  mac80211: Is not EXPERIMENTAL anymore
  iwl3945-base.c: fix off-by-one errors
  b43legacy: fix DMA slot resource leakage
  b43legacy: drop packets we are not able to encrypt
  b43legacy: fix suspend/resume
  b43legacy: fix PIO crash
  Generic HDLC - use random_ether_addr()
  ...
Diffstat (limited to 'drivers/net/tlan.c')
| -rw-r--r-- | drivers/net/tlan.c | 25 | 
1 files changed, 18 insertions, 7 deletions
| diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index c99ce74a7aff..3af5b92b48c8 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
| @@ -465,7 +465,7 @@ static struct pci_driver tlan_driver = { | |||
| 465 | 465 | ||
| 466 | static int __init tlan_probe(void) | 466 | static int __init tlan_probe(void) | 
| 467 | { | 467 | { | 
| 468 | static int pad_allocated; | 468 | int rc = -ENODEV; | 
| 469 | 469 | ||
| 470 | printk(KERN_INFO "%s", tlan_banner); | 470 | printk(KERN_INFO "%s", tlan_banner); | 
| 471 | 471 | ||
| @@ -473,17 +473,22 @@ static int __init tlan_probe(void) | |||
| 473 | 473 | ||
| 474 | if (TLanPadBuffer == NULL) { | 474 | if (TLanPadBuffer == NULL) { | 
| 475 | printk(KERN_ERR "TLAN: Could not allocate memory for pad buffer.\n"); | 475 | printk(KERN_ERR "TLAN: Could not allocate memory for pad buffer.\n"); | 
| 476 | return -ENOMEM; | 476 | rc = -ENOMEM; | 
| 477 | goto err_out; | ||
| 477 | } | 478 | } | 
| 478 | 479 | ||
| 479 | memset(TLanPadBuffer, 0, TLAN_MIN_FRAME_SIZE); | 480 | memset(TLanPadBuffer, 0, TLAN_MIN_FRAME_SIZE); | 
| 480 | pad_allocated = 1; | ||
| 481 | 481 | ||
| 482 | TLAN_DBG(TLAN_DEBUG_PROBE, "Starting PCI Probe....\n"); | 482 | TLAN_DBG(TLAN_DEBUG_PROBE, "Starting PCI Probe....\n"); | 
| 483 | 483 | ||
| 484 | /* Use new style PCI probing. Now the kernel will | 484 | /* Use new style PCI probing. Now the kernel will | 
| 485 | do most of this for us */ | 485 | do most of this for us */ | 
| 486 | pci_register_driver(&tlan_driver); | 486 | rc = pci_register_driver(&tlan_driver); | 
| 487 | |||
| 488 | if (rc != 0) { | ||
| 489 | printk(KERN_ERR "TLAN: Could not register pci driver.\n"); | ||
| 490 | goto err_out_pci_free; | ||
| 491 | } | ||
| 487 | 492 | ||
| 488 | TLAN_DBG(TLAN_DEBUG_PROBE, "Starting EISA Probe....\n"); | 493 | TLAN_DBG(TLAN_DEBUG_PROBE, "Starting EISA Probe....\n"); | 
| 489 | TLan_EisaProbe(); | 494 | TLan_EisaProbe(); | 
| @@ -493,11 +498,17 @@ static int __init tlan_probe(void) | |||
| 493 | tlan_have_pci, tlan_have_eisa); | 498 | tlan_have_pci, tlan_have_eisa); | 
| 494 | 499 | ||
| 495 | if (TLanDevicesInstalled == 0) { | 500 | if (TLanDevicesInstalled == 0) { | 
| 496 | pci_unregister_driver(&tlan_driver); | 501 | rc = -ENODEV; | 
| 497 | pci_free_consistent(NULL, TLAN_MIN_FRAME_SIZE, TLanPadBuffer, TLanPadBufferDMA); | 502 | goto err_out_pci_unreg; | 
| 498 | return -ENODEV; | ||
| 499 | } | 503 | } | 
| 500 | return 0; | 504 | return 0; | 
| 505 | |||
| 506 | err_out_pci_unreg: | ||
| 507 | pci_unregister_driver(&tlan_driver); | ||
| 508 | err_out_pci_free: | ||
| 509 | pci_free_consistent(NULL, TLAN_MIN_FRAME_SIZE, TLanPadBuffer, TLanPadBufferDMA); | ||
| 510 | err_out: | ||
| 511 | return rc; | ||
| 501 | } | 512 | } | 
| 502 | 513 | ||
| 503 | 514 | ||
