Fix error check

This commit is contained in:
Cameron Gutman 2023-08-31 17:55:50 -05:00
parent d1db1d5231
commit 41fddcf5ef

View File

@ -368,7 +368,7 @@ int rk_setup(int videoFormat, int width, int height, int redrawRate, void* conte
}
fd = open("/dev/dri/card0", O_RDWR | O_CLOEXEC);
if (fd >= 0) {
if (fd < 0) {
fprintf(stderr, "Unable to open card0: %d\n", errno);
return -1;
}