mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
exynos_gfx: fix error handling of fd open
Opening an fd can fail for multiple reasons, we would just error out on EPERM. Handle the other cases as well.
This commit is contained in:
parent
43a113ee8d
commit
3183149c8c
@ -181,7 +181,7 @@ static int get_device_index(void)
|
||||
snprintf(buf, sizeof(buf), "/dev/dri/card%d", index);
|
||||
|
||||
fd = open(buf, O_RDWR);
|
||||
if (fd == -1) break;
|
||||
if (fd < 0) break;
|
||||
|
||||
ver = drmGetVersion(fd);
|
||||
|
||||
@ -599,7 +599,7 @@ static int exynos_open(struct exynos_data *pdata)
|
||||
}
|
||||
|
||||
fd = open(buf, O_RDWR);
|
||||
if (fd == -1)
|
||||
if (fd < 0)
|
||||
{
|
||||
RARCH_ERR("video_exynos: can't open drm device\n");
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user