From 95a629657dbe28e44a312c47815b3dc3f1ce0970 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 28 Jul 2005 11:37:33 -0700 Subject: [PATCH] PCI: start paying attention to a lot of pci function return values Signed-off-by: Greg Kroah-Hartman --- drivers/pci/pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/pci/pci.c') diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 93ec158..afee2de 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -444,8 +444,11 @@ pci_enable_device_bars(struct pci_dev *dev, int bars) { int err; - pci_set_power_state(dev, PCI_D0); - if ((err = pcibios_enable_device(dev, bars)) < 0) + err = pci_set_power_state(dev, PCI_D0); + if (err) + return err; + err = pcibios_enable_device(dev, bars); + if (err < 0) return err; return 0; } -- cgit v1.1