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>
(cherry picked from commit 0a78b599b3
)
This commit is contained in:
parent
19da4355ee
commit
dee92c7805
|
@ -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
Block a user