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>
This commit is contained in:
parent
c7d655ef2e
commit
4d23d9f7fa
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue