summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2015-02-07 18:13:21 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2015-03-13 12:31:21 +1000
commit0a78b599b34cc8b5fe6fe82f90e90234e8ab7a56 (patch)
treec2f372f1a02481056afd7174246a6842873b0bb0
parent21b896939c5bb242f3aacc37baf12379e43254b6 (diff)
int10: Fix error check for pci_device_map_legacy
pci_device_map_legacy returns 0 on success. Signed-off-by: Jürg Billeter <j@bitron.ch> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--hw/xfree86/int10/generic.c2
-rw-r--r--hw/xfree86/os-support/linux/int10/linux.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 012d1941a..8d5c4daf3 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -104,7 +104,7 @@ readIntVec(struct pci_device *dev, unsigned char *buf, int len)
{
void *map;
- if (!pci_device_map_legacy(dev, 0, len, 0, &map))
+ if (pci_device_map_legacy(dev, 0, len, 0, &map))
return FALSE;
memcpy(buf, map, len);
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index 79b9a8858..6ca118f25 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -75,7 +75,7 @@ readLegacy(struct pci_device *dev, unsigned char *buf, int base, int len)
{
void *map;
- if (!pci_device_map_legacy(dev, base, len, 0, &map))
+ if (pci_device_map_legacy(dev, base, len, 0, &map))
return FALSE;
memcpy(buf, map, len);