Merge pull request #1474 from tobiasjakobi/fixes

exynos_gfx: fix error handling of fd open
This commit is contained in:
Twinaphex 2015-03-07 15:06:10 +01:00
commit 2ead788aa3

View File

@ -181,7 +181,7 @@ static int get_device_index(void)
snprintf(buf, sizeof(buf), "/dev/dri/card%d", index); snprintf(buf, sizeof(buf), "/dev/dri/card%d", index);
fd = open(buf, O_RDWR); fd = open(buf, O_RDWR);
if (fd == -1) break; if (fd < 0) break;
ver = drmGetVersion(fd); ver = drmGetVersion(fd);
@ -599,7 +599,7 @@ static int exynos_open(struct exynos_data *pdata)
} }
fd = open(buf, O_RDWR); fd = open(buf, O_RDWR);
if (fd == -1) if (fd < 0)
{ {
RARCH_ERR("video_exynos: can't open drm device\n"); RARCH_ERR("video_exynos: can't open drm device\n");
return -1; return -1;