[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1650788998-14967-1-git-send-email-baihaowen@meizu.com>
Date: Sun, 24 Apr 2022 16:29:58 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: Anitha Chrisanthus <anitha.chrisanthus@...el.com>,
Edmund Dea <edmund.j.dea@...el.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>
CC: Haowen Bai <baihaowen@...zu.com>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm/kmb: Fix unsigned function returning negative constant
The function check_pixel_format has an unsigned return type, but returns a
negative constant to indicate an error condition. So we change unsigned
to int.
Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
drivers/gpu/drm/kmb/kmb_plane.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/kmb/kmb_plane.c b/drivers/gpu/drm/kmb/kmb_plane.c
index 2735b8eb3537..5071b7029da6 100644
--- a/drivers/gpu/drm/kmb/kmb_plane.c
+++ b/drivers/gpu/drm/kmb/kmb_plane.c
@@ -65,7 +65,7 @@ static const u32 kmb_formats_v[] = {
DRM_FORMAT_NV12, DRM_FORMAT_NV21,
};
-static unsigned int check_pixel_format(struct drm_plane *plane, u32 format)
+static int check_pixel_format(struct drm_plane *plane, u32 format)
{
struct kmb_drm_private *kmb;
struct kmb_plane *kmb_plane = to_kmb_plane(plane);
--
2.7.4
Powered by blists - more mailing lists