OSDN Git Service

Silence runtime complaints on platform devices
[android-x86/external-libdrm.git] / xf86drm.c
index 9cfca49..52add5e 100644 (file)
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -3149,7 +3149,6 @@ int drmGetDevice(int fd, drmDevicePtr *device)
 
             break;
         default:
-            fprintf(stderr, "The subsystem type is not supported yet\n");
             continue;
         }
 
@@ -3181,6 +3180,8 @@ int drmGetDevice(int fd, drmDevicePtr *device)
 
     closedir(sysdir);
     free(local_devices);
+    if (*device == NULL)
+       return -ENODEV;
     return 0;
 
 free_devices:
@@ -3257,7 +3258,6 @@ int drmGetDevices(drmDevicePtr devices[], int max_devices)
 
             break;
         default:
-            fprintf(stderr, "The subsystem type is not supported yet\n");
             continue;
         }