[COMMON] g2d: fix unsigned datatype
authorhyesoo.yu <hyesoo.yu@samsung.com>
Wed, 16 Aug 2017 02:08:13 +0000 (11:08 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:14 +0000 (20:22 +0300)
'get_unused_fd_flags' is stored in unsigned datatype,
so could not be handled on error.

Change-Id: I009949ab228689bc0aed21615894ecdb9de926ea
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/gpu/exynos/g2d/g2d_fence.c

index 7469dd3e74ce672eb2e6541df2ac548ffa2bbbf9..a23bdccdddd0ed9c372ea1cd51baba96e819f4d0 100644 (file)
@@ -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]);