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>
This commit is contained in:
Jürg Billeter 2015-02-07 18:13:21 +01:00 committed by Peter Hutterer
parent 21b896939c
commit 0a78b599b3
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);