mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-26 05:20:11 +01:00
xf86drm: Handle unrecognized subsystems safely in drmGetDevice[s]()
Both drmGetDevice() and drmGetDevices() currently print a warning when they encounter an unknown (non-PCI) subsystem type for a device node, but they still proceed to assume that the drmDevicePtr was initialized and try to add it to the local device array. Add a 'continue' to the error case handling to bypass the rest of the processing for devices we can't handle. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
cf0f036e3d
commit
ba5a6ecf81
1 changed files with 2 additions and 2 deletions
|
|
@ -3140,7 +3140,7 @@ int drmGetDevice(int fd, drmDevicePtr *device)
|
|||
break;
|
||||
default:
|
||||
fprintf(stderr, "The subsystem type is not supported yet\n");
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i >= max_count) {
|
||||
|
|
@ -3244,7 +3244,7 @@ int drmGetDevices(drmDevicePtr devices[], int max_devices)
|
|||
break;
|
||||
default:
|
||||
fprintf(stderr, "The subsystem type is not supported yet\n");
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i >= max_count) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue