summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie/portdrv_pci.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-08-28 11:43:25 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 17:43:53 -0700
commitb19441af185559118e8247382ea4f2f76ebffc6d (patch)
tree5b687d2a0052b38fa5d32abeec75374b4aa8830e /drivers/pci/pcie/portdrv_pci.c
parent660a0e8fdf85f30b1e5f6905a78361476094eb7c (diff)
PCI: fix __must_check warnings
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pcie/portdrv_pci.c')
-rw-r--r--drivers/pci/pcie/portdrv_pci.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index e4a2429986f..037690e08f5 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -147,8 +147,10 @@ static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev,
{
struct aer_broadcast_data result_data =
{error, PCI_ERS_RESULT_CAN_RECOVER};
+ int retval;
- device_for_each_child(&dev->dev, &result_data, error_detected_iter);
+ /* can not fail */
+ retval = device_for_each_child(&dev->dev, &result_data, error_detected_iter);
return result_data.result;
}
@@ -181,8 +183,10 @@ static int mmio_enabled_iter(struct device *device, void *data)
static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev)
{
pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
+ int retval;
- device_for_each_child(&dev->dev, &status, mmio_enabled_iter);
+ /* get true return value from &status */
+ retval = device_for_each_child(&dev->dev, &status, mmio_enabled_iter);
return status;
}
@@ -214,6 +218,7 @@ static int slot_reset_iter(struct device *device, void *data)
static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
{
pci_ers_result_t status;
+ int retval;
/* If fatal, restore cfg space for possible link reset at upstream */
if (dev->error_state == pci_channel_io_frozen) {
@@ -221,7 +226,8 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
pci_enable_pcie_error_reporting(dev);
}
- device_for_each_child(&dev->dev, &status, slot_reset_iter);
+ /* get true return value from &status */
+ retval = device_for_each_child(&dev->dev, &status, slot_reset_iter);
return status;
}
@@ -248,7 +254,9 @@ static int resume_iter(struct device *device, void *data)
static void pcie_portdrv_err_resume(struct pci_dev *dev)
{
- device_for_each_child(&dev->dev, NULL, resume_iter);
+ int retval;
+ /* nothing to do with error value, if it ever happens */
+ retval = device_for_each_child(&dev->dev, NULL, resume_iter);
}
/*