summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/i915_gem_tiling.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-core/i915_gem_tiling.c b/linux-core/i915_gem_tiling.c
index 90029192..a4ff736f 100644
--- a/linux-core/i915_gem_tiling.c
+++ b/linux-core/i915_gem_tiling.c
@@ -115,7 +115,11 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
* since the bridge would only ever use standard BARs 0-1 (though it
* doesn't anyway)
*/
- pci_read_base(bridge, mchbar_offset, &bridge->resource[2]);
+ ret = pci_read_base(bridge, mchbar_offset, &bridge->resource[2]);
+ if (ret != 0) {
+ DRM_ERROR("pci_read_base failed: %d\n", ret);
+ return;
+ }
mchbar = ioremap(pci_resource_start(bridge, 2),
pci_resource_len(bridge, 2));