[PATCH 1/4] drm/i915: Report -ENODEV after injecting probe failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux