netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 08/18] 3c59x: check return of pci_enable_device()
@ 2007-08-10 21:05 akpm
  2007-08-14  5:33 ` Jeff Garzik
  2007-08-14  9:54 ` Mark Hindley
  0 siblings, 2 replies; 10+ messages in thread
From: akpm @ 2007-08-10 21:05 UTC (permalink / raw)
  To: jeff; +Cc: netdev, akpm, mark, klassert

From: Mark Hindley <mark@hindley.org.uk>

Check return of pci_enable_device in vortex_up().

Signed-off-by: Mark Hindley <mark@hindley.org.uk>
Acked-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/3c59x.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -puN drivers/net/3c59x.c~3c59x-check-return-of-pci_enable_device drivers/net/3c59x.c
--- a/drivers/net/3c59x.c~3c59x-check-return-of-pci_enable_device
+++ a/drivers/net/3c59x.c
@@ -1490,13 +1490,17 @@ vortex_up(struct net_device *dev)
 	struct vortex_private *vp = netdev_priv(dev);
 	void __iomem *ioaddr = vp->ioaddr;
 	unsigned int config;
-	int i, mii_reg1, mii_reg5;
+	int i, mii_reg1, mii_reg5, err;
 
 	if (VORTEX_PCI(vp)) {
 		pci_set_power_state(VORTEX_PCI(vp), PCI_D0);	/* Go active */
 		if (vp->pm_state_valid)
 			pci_restore_state(VORTEX_PCI(vp));
-		pci_enable_device(VORTEX_PCI(vp));
+		err = pci_enable_device(VORTEX_PCI(vp));
+		if (err) {
+			printk(KERN_WARNING "%s: Could not enable device \n",
+				dev->name);
+		}
 	}
 
 	/* Before initializing select the active media port. */
_

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-08-31 13:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-10 21:05 [patch 08/18] 3c59x: check return of pci_enable_device() akpm
2007-08-14  5:33 ` Jeff Garzik
2007-08-14  9:54 ` Mark Hindley
2007-08-15 16:30   ` Steffen Klassert
2007-08-15 20:59     ` Steffen Klassert
2007-08-16 10:28     ` [REVISED PATCH] " Mark Hindley
2007-08-31 13:08       ` Jeff Garzik
2007-08-31 13:21         ` Steffen Klassert
2007-08-31 13:33           ` Jeff Garzik
2007-08-31 13:32       ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).