diff options
Diffstat (limited to 'freedreno/kgsl')
-rw-r--r-- | freedreno/kgsl/kgsl_bo.c | 1 | ||||
-rw-r--r-- | freedreno/kgsl/kgsl_pipe.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c index 15c3ff50..3407c769 100644 --- a/freedreno/kgsl/kgsl_bo.c +++ b/freedreno/kgsl/kgsl_bo.c @@ -168,6 +168,7 @@ drm_private struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev, bo = &kgsl_bo->base; bo->funcs = &funcs; + bo->fd = -1; for (i = 0; i < ARRAY_SIZE(kgsl_bo->list); i++) list_inithead(&kgsl_bo->list[i]); diff --git a/freedreno/kgsl/kgsl_pipe.c b/freedreno/kgsl/kgsl_pipe.c index fc76b2b8..08c87a62 100644 --- a/freedreno/kgsl/kgsl_pipe.c +++ b/freedreno/kgsl/kgsl_pipe.c @@ -101,7 +101,7 @@ static void kgsl_pipe_destroy(struct fd_pipe *pipe) if (kgsl_pipe->drawctxt_id) ioctl(kgsl_pipe->fd, IOCTL_KGSL_DRAWCTXT_DESTROY, &req); - if (kgsl_pipe->fd) + if (kgsl_pipe->fd >= 0) close(kgsl_pipe->fd); free(kgsl_pipe); |