mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 21:50:15 +01:00
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
2 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue