kms/impl-device: Use priv->path in _open_non_privileged_fd
This can work even if priv->device_file == NULL, e.g. with a secondary GPU with no displays connected. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3833>
This commit is contained in:
parent
4eacf97678
commit
eb8c2f600a
1 changed files with 1 additions and 4 deletions
|
@ -1211,10 +1211,7 @@ meta_kms_impl_device_open_non_privileged_fd (MetaKmsImplDevice *impl_device)
|
|||
MetaKmsImplDevicePrivate *priv =
|
||||
meta_kms_impl_device_get_instance_private (impl_device);
|
||||
|
||||
if (!priv->device_file)
|
||||
return -1;
|
||||
|
||||
path = meta_device_file_get_path (priv->device_file);
|
||||
path = priv->path;
|
||||
|
||||
fd = open (path, O_RDWR | O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
|
|
Loading…
Reference in a new issue