[Intel-gfx] [PATCH 1/4] drm/i915: Report -ENODEV after injecting probe failure
Michal Wajdeczko
michal.wajdeczko at intel.com
Mon Jul 29 15:22:58 UTC 2019
We want to do more driver testing using injected load errors,
but we don't want to limit ourselves to use only -ENODEV (as
other errors are interpreted as real issues, like this:
<4> [381.569479] i915: probe of 0000:00:02.0 failed with error -7
Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
---
drivers/gpu/drm/i915/i915_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index bd9211b3d76e..332949c20a29 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -956,7 +956,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err = i915_driver_probe(pdev, ent);
if (err)
- return err;
+ return i915_error_injected() ? -ENODEV : err;
if (i915_inject_probe_failure()) {
i915_pci_remove(pdev);
--
2.19.2
More information about the Intel-gfx
mailing list