netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 3c59x, check return of pci_enable_device()
@ 2007-07-21 22:13 Mark Hindley
  0 siblings, 0 replies; only message in thread
From: Mark Hindley @ 2007-07-21 22:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev

commit 36d139ccebba6a1082b743fbedb53c5a5097987c
Author: Mark Hindley <mark@hindley.org.uk>
Date:   Sat Jul 21 22:56:08 2007 +0100

    Check return of pci_enable_device in vortex_up().
    
    Signed-off-by: Mark Hindley <mark@hindley.org.uk>

diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index f26ca33..192e74b 100644
--- a/drivers/net/3c59x.c
+++ b/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 related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-21 22:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-21 22:13 [PATCH] 3c59x, check return of pci_enable_device() Mark Hindley

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).