diff options
author | Eric Anholt <eric@anholt.net> | 2008-07-29 11:10:47 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-07-29 11:10:47 -0700 |
commit | 0f78e30e0a189b76df3558f53ff2a92b841cd7ab (patch) | |
tree | 3fd35fae0cc9846a017529c8aa2105de42d91ad1 /linux-core | |
parent | 0e49e49c9f8fdbe77740c1bdcc0cb4102d26bf7a (diff) |
intel-gem: Check return value of pci_read_base.
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/i915_gem_tiling.c | 6 |
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)); |