[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250830124703.73732-1-rongqianfeng@vivo.com>
Date: Sat, 30 Aug 2025 20:47:00 +0800
From: Qianfeng Rong <rongqianfeng@...o.com>
To: Helge Deller <deller@....de>,
Thomas Zimmermann <tzimmermann@...e.de>,
Qianfeng Rong <rongqianfeng@...o.com>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
linux-fbdev@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] fbdev: mb862xxfb: Use int type to store negative error codes
Change the 'ret' variable in of_platform_mb862xx_probe() from unsigned long
to int, as it needs to store either negative error codes or zero.
Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but can be confusing. Additionally, assigning negative error
codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
flag is enabled.
No effect on runtime.
Signed-off-by: Qianfeng Rong <rongqianfeng@...o.com>
---
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c b/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
index ade88e7bc760..676c6d3ccc12 100644
--- a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
+++ b/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
@@ -674,7 +674,7 @@ static int of_platform_mb862xx_probe(struct platform_device *ofdev)
struct fb_info *info;
struct resource res;
resource_size_t res_size;
- unsigned long ret = -ENODEV;
+ int ret = -ENODEV;
if (of_address_to_resource(np, 0, &res)) {
dev_err(dev, "Invalid address\n");
--
2.34.1
Powered by blists - more mailing lists