From 1fd3dc373828150f4a1423738db950b0e655cec9 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 17 Jun 2021 10:02:08 +0900 Subject: [PATCH] tbm_module: fix the wrong condition A fd has to be checked if it is less than 0. Change-Id: Ia71d5208060e4d1e6e6965c3f3848e0d77aaea6c --- src/tbm_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tbm_module.c b/src/tbm_module.c index 140392a..a29b477 100644 --- a/src/tbm_module.c +++ b/src/tbm_module.c @@ -509,7 +509,7 @@ tbm_module_bufmgr_bind_native_display(tbm_module *module, void *native_display) case TBM_MODULE_TYPE_HAL_TBM: if (hal_tbm_backend_has_drm_device(module->hal_backend, &ret)) { int fd = tbm_drm_helper_get_fd(); // this must be the auth drm_fd.(master drm_fd); - if (fd < -1) { + if (fd < 0) { TBM_ERR("error: module(%p) native_display(%p)\n", module, native_display); return TBM_ERROR_INVALID_OPERATION; } -- 2.34.1