diff options
Diffstat (limited to 'drivers/pci/pcie/portdrv_pci.c')
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index ed4d09498337..696caed5fdf5 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -259,11 +259,9 @@ static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev, | |||
259 | enum pci_channel_state error) | 259 | enum pci_channel_state error) |
260 | { | 260 | { |
261 | struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER}; | 261 | struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER}; |
262 | int ret; | ||
263 | |||
264 | /* can not fail */ | ||
265 | ret = device_for_each_child(&dev->dev, &data, error_detected_iter); | ||
266 | 262 | ||
263 | /* get true return value from &data */ | ||
264 | device_for_each_child(&dev->dev, &data, error_detected_iter); | ||
267 | return data.result; | 265 | return data.result; |
268 | } | 266 | } |
269 | 267 | ||
@@ -295,10 +293,9 @@ static int mmio_enabled_iter(struct device *device, void *data) | |||
295 | static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) | 293 | static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) |
296 | { | 294 | { |
297 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; | 295 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
298 | int retval; | ||
299 | 296 | ||
300 | /* get true return value from &status */ | 297 | /* get true return value from &status */ |
301 | retval = device_for_each_child(&dev->dev, &status, mmio_enabled_iter); | 298 | device_for_each_child(&dev->dev, &status, mmio_enabled_iter); |
302 | return status; | 299 | return status; |
303 | } | 300 | } |
304 | 301 | ||
@@ -330,7 +327,6 @@ static int slot_reset_iter(struct device *device, void *data) | |||
330 | static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) | 327 | static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) |
331 | { | 328 | { |
332 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; | 329 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
333 | int retval; | ||
334 | 330 | ||
335 | /* If fatal, restore cfg space for possible link reset at upstream */ | 331 | /* If fatal, restore cfg space for possible link reset at upstream */ |
336 | if (dev->error_state == pci_channel_io_frozen) { | 332 | if (dev->error_state == pci_channel_io_frozen) { |
@@ -341,8 +337,7 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) | |||
341 | } | 337 | } |
342 | 338 | ||
343 | /* get true return value from &status */ | 339 | /* get true return value from &status */ |
344 | retval = device_for_each_child(&dev->dev, &status, slot_reset_iter); | 340 | device_for_each_child(&dev->dev, &status, slot_reset_iter); |
345 | |||
346 | return status; | 341 | return status; |
347 | } | 342 | } |
348 | 343 | ||
@@ -368,9 +363,7 @@ static int resume_iter(struct device *device, void *data) | |||
368 | 363 | ||
369 | static void pcie_portdrv_err_resume(struct pci_dev *dev) | 364 | static void pcie_portdrv_err_resume(struct pci_dev *dev) |
370 | { | 365 | { |
371 | int retval; | 366 | device_for_each_child(&dev->dev, NULL, resume_iter); |
372 | /* nothing to do with error value, if it ever happens */ | ||
373 | retval = device_for_each_child(&dev->dev, NULL, resume_iter); | ||
374 | } | 367 | } |
375 | 368 | ||
376 | /* | 369 | /* |