aboutsummaryrefslogtreecommitdiffstats
path: root/omap
diff options
context:
space:
mode:
Diffstat (limited to 'omap')
-rw-r--r--omap/omap_drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index ff83a930..4a0248d5 100644
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
@@ -363,7 +363,7 @@ void omap_bo_del(struct omap_bo *bo)
363 munmap(bo->map, bo->size); 363 munmap(bo->map, bo->size);
364 } 364 }
365 365
366 if (bo->fd) { 366 if (bo->fd >= 0) {
367 close(bo->fd); 367 close(bo->fd);
368 } 368 }
369 369
@@ -414,7 +414,7 @@ uint32_t omap_bo_handle(struct omap_bo *bo)
414 */ 414 */
415int omap_bo_dmabuf(struct omap_bo *bo) 415int omap_bo_dmabuf(struct omap_bo *bo)
416{ 416{
417 if (!bo->fd) { 417 if (bo->fd < 0) {
418 struct drm_prime_handle req = { 418 struct drm_prime_handle req = {
419 .handle = bo->handle, 419 .handle = bo->handle,
420 .flags = DRM_CLOEXEC, 420 .flags = DRM_CLOEXEC,