[PATCH libdrm 3/3] xf86drm: don't fatal on per device error in drmGetDevice[s]2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When iterating over all the device nodes if drmProcessPciDevice()
returned an error for any node the function would return an error,
ignoring any valid nodes.

The result of this on OpenBSD where drmProcessPciDevice() results in
device nodes being opened to issue ioctls to get pci data
was that data obtained from /dev/drm0 would be ignored if /dev/drm1
could not be opened.

Signed-off-by: Jonathan Gray <jsg@xxxxxxxxx>
---
 xf86drm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xf86drm.c b/xf86drm.c
index afce8ec..2dc679a 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -3383,7 +3383,7 @@ int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device)
         case DRM_BUS_PCI:
             ret = drmProcessPciDevice(&d, node, node_type, maj, min, true, flags);
             if (ret)
-                goto free_devices;
+                continue;
 
             break;
         default:
@@ -3514,7 +3514,7 @@ int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices)
             ret = drmProcessPciDevice(&device, node, node_type,
                                       maj, min, devices != NULL, flags);
             if (ret)
-                goto free_devices;
+                continue;
 
             break;
         default:
-- 
2.10.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux