drm/i915/drv: return -EIO instead of -1
Avoid using the incidental -EPERM. Return the -EIO directly from i915_get_bridge_dev() instead of converting return values later. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1ee72c31963d8be98490cd78f7c1182ba4f54c13.1633000838.git.jani.nikula@intel.com
This commit is contained in:
parent
0743019d54
commit
5e9a0200da
1 changed files with 4 additions and 3 deletions
|
@ -97,7 +97,7 @@ static int i915_get_bridge_dev(struct drm_i915_private *dev_priv)
|
|||
pci_get_domain_bus_and_slot(domain, 0, PCI_DEVFN(0, 0));
|
||||
if (!dev_priv->bridge_dev) {
|
||||
drm_err(&dev_priv->drm, "bridge device not found\n");
|
||||
return -1;
|
||||
return -EIO;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -409,8 +409,9 @@ static int i915_driver_mmio_probe(struct drm_i915_private *dev_priv)
|
|||
if (i915_inject_probe_failure(dev_priv))
|
||||
return -ENODEV;
|
||||
|
||||
if (i915_get_bridge_dev(dev_priv))
|
||||
return -EIO;
|
||||
ret = i915_get_bridge_dev(dev_priv);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = intel_uncore_init_mmio(&dev_priv->uncore);
|
||||
if (ret < 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue