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:
parent
21b896939c
commit
0a78b599b3
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue