diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/aer/aer_inject.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c index 797d47809f7a..dd7155a037e7 100644 --- a/drivers/pci/pcie/aer/aer_inject.c +++ b/drivers/pci/pcie/aer/aer_inject.c | |||
@@ -413,8 +413,14 @@ static int aer_inject(struct aer_error_inj *einj) | |||
413 | if (ret) | 413 | if (ret) |
414 | goto out_put; | 414 | goto out_put; |
415 | 415 | ||
416 | if (find_aer_device(rpdev, &edev)) | 416 | if (find_aer_device(rpdev, &edev)) { |
417 | if (!get_service_data(edev)) { | ||
418 | printk(KERN_WARNING "AER service is not initialized\n"); | ||
419 | ret = -EINVAL; | ||
420 | goto out_put; | ||
421 | } | ||
417 | aer_irq(-1, edev); | 422 | aer_irq(-1, edev); |
423 | } | ||
418 | else | 424 | else |
419 | ret = -EINVAL; | 425 | ret = -EINVAL; |
420 | out_put: | 426 | out_put: |