e1000: Fix msi enable leak on error, don't print error message, cleanup

pci_enable_msi failure is a normal event so we should not print any error.
Going over the code I spotted a missing pci_disable_msi() leak when irq
allocation fails. The whole code also needed a cleanup, so I combined the
two different calls to pci_request_irq into a single call making this
look a lot better. All #ifdef CONFIG_PCI_MSI's have been removed.

Compile tested with both CONFIG_PCI_MSI enabled and disabled.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Auke Kok
2007-05-16 01:49:46 -07:00
committed by Jeff Garzik
parent fb136c070b
commit e94bd23f67
2 changed files with 15 additions and 28 deletions
+1 -3
View File
@@ -333,11 +333,9 @@ struct e1000_adapter {
struct e1000_tx_ring test_tx_ring;
struct e1000_rx_ring test_rx_ring;
int msg_enable;
#ifdef CONFIG_PCI_MSI
boolean_t have_msi;
#endif
/* to not mess up cache alignment, always add to the bottom */
boolean_t tso_force;
boolean_t smart_power_down; /* phy smart power down */