diff options
-rw-r--r-- | src/nv_setup.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/nv_setup.c b/src/nv_setup.c index b057da1..bea0050 100644 --- a/src/nv_setup.c +++ b/src/nv_setup.c @@ -341,7 +341,10 @@ NVCommonSetup(ScrnInfoPtr pScrn) int FlatPanel = -1; /* really means the CRTC is slaved */ Bool Television = FALSE; void *tmp; - +#if XSERVER_LIBPCIACCESS + int err; +#endif + /* * Override VGA I/O routines. */ @@ -371,8 +374,12 @@ NVCommonSetup(ScrnInfoPtr pScrn) pVga->MMIOOffset = 0; #if XSERVER_LIBPCIACCESS - pci_device_map_range(pNv->PciInfo, pNv->IOAddress, 0x01000000, - PCI_DEV_MAP_FLAG_WRITABLE, &tmp); + err = pci_device_map_range(pNv->PciInfo, pNv->IOAddress, 0x01000000, + PCI_DEV_MAP_FLAG_WRITABLE, &tmp); + if (err != 0) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "pci_device_map_range failed: %s\n", strerror(err)); + } #else tmp = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO | VIDMEM_READSIDEEFFECT, pNv->PciTag, pNv->IOAddress, 0x01000000); |