drm/radeon: Fix pci_map_page() error checking
[deliverable/linux.git] / drivers / gpu / drm / ati_pcigart.c
index 17be051b7aa3109c4aef78b320823da2eecb5fc8..1c3649242208a5f38f8bda017799f4519a14e43d 100644 (file)
@@ -152,7 +152,7 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
                /* we need to support large memory configurations */
                entry->busaddr[i] = pci_map_page(dev->pdev, 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");
                        drm_ati_pcigart_cleanup(dev, gart_info);
                        address = NULL;
This page took 0.023692 seconds and 5 git commands to generate.