summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600_cp.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-10 14:48:58 +1000
committerDave Airlie <airlied@redhat.com>2010-08-12 09:38:29 +1000
commita30f6fb7ce86275af16c7a00dc1b1e46cbb99692 (patch)
tree2097765b7dd20577bca52781d7f216c9d1829244 /drivers/gpu/drm/radeon/r600_cp.c
parent1a72d65d6291ec248cbc5f05df2487edd714aba6 (diff)
downloadblackbird-op-linux-a30f6fb7ce86275af16c7a00dc1b1e46cbb99692.tar.gz
blackbird-op-linux-a30f6fb7ce86275af16c7a00dc1b1e46cbb99692.zip
drm/radeon: Fix pci_map_page() error checking
0 is a valid DMA address from pci_map_page(), use pci_dma_mapping_error() instead to check for errors [airlied: fix warning + two other places with errors.] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_cp.c')
-rw-r--r--drivers/gpu/drm/radeon/r600_cp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
index 68e6f4349309..4f4cd8b286d5 100644
--- a/drivers/gpu/drm/radeon/r600_cp.c
+++ b/drivers/gpu/drm/radeon/r600_cp.c
@@ -200,7 +200,7 @@ int r600_page_table_init(struct drm_device *dev)
entry->pagelist[i], 0,
PAGE_SIZE,
PCI_DMA_BIDIRECTIONAL);
- if (entry->busaddr[i] == 0) {
+ if (pci_dma_mapping_error(dev->pdev, entry->busaddr[i])) {
DRM_ERROR("unable to map PCIGART pages!\n");
r600_page_table_cleanup(dev, gart_info);
goto done;
OpenPOWER on IntegriCloud