1
0
Fork 0

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:
Michel Dänzer 2024-06-21 11:37:50 +02:00 committed by Marge Bot
parent 4eacf97678
commit eb8c2f600a

View file

@ -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)