From: hyesoo.yu Date: Wed, 16 Aug 2017 02:08:13 +0000 (+0900) Subject: [COMMON] g2d: fix unsigned datatype X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02017a66bfe0e41907aabbfd05dd03fb176bccf1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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]);