Skip to content

Commit 4d23d9f

Browse files
qianfengronghdeller
authored andcommitted
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@vivo.com> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent c7d655e commit 4d23d9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/video/fbdev/mb862xx/mb862xxfbdrv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ static int of_platform_mb862xx_probe(struct platform_device *ofdev)
674674
struct fb_info *info;
675675
struct resource res;
676676
resource_size_t res_size;
677-
unsigned long ret = -ENODEV;
677+
int ret = -ENODEV;
678678

679679
if (of_address_to_resource(np, 0, &res)) {
680680
dev_err(dev, "Invalid address\n");

0 commit comments

Comments
 (0)