From 02017a66bfe0e41907aabbfd05dd03fb176bccf1 Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Wed, 16 Aug 2017 11:08:13 +0900 Subject: [PATCH] [COMMON] g2d: fix unsigned datatype 'get_unused_fd_flags' is stored in unsigned datatype, so could not be handled on error. Change-Id: I009949ab228689bc0aed21615894ecdb9de926ea Signed-off-by: hyesoo.yu --- drivers/gpu/exynos/g2d/g2d_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/exynos/g2d/g2d_fence.c b/drivers/gpu/exynos/g2d/g2d_fence.c index 7469dd3e74ce..a23bdccdddd0 100644 --- a/drivers/gpu/exynos/g2d/g2d_fence.c +++ b/drivers/gpu/exynos/g2d/g2d_fence.c @@ -176,7 +176,7 @@ struct sync_file *g2d_create_release_fence(struct g2d_device *g2d_dev, for (i = 0; i < data->num_release_fences; i++) { release_fences[i] = get_unused_fd_flags(O_CLOEXEC); - if (release_fences[i] < 0) { + if ((int)release_fences[i] < 0) { ret = release_fences[i]; while (i-- > 0) put_unused_fd(release_fences[i]); -- 2.20.1