Commit 34bdb666 authored by Fabian Frederick's avatar Fabian Frederick Committed by Tomi Valkeinen

fbdev: fbmem: remove positive test on unsigned values

fb_image.dx, fb_image.dy and fbconf2bmap.framebuffer are __u32

Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 7a966fbd
...@@ -433,7 +433,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, ...@@ -433,7 +433,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
image->dx += image->width + 8; image->dx += image->width + 8;
} }
} else if (rotate == FB_ROTATE_UD) { } else if (rotate == FB_ROTATE_UD) {
for (x = 0; x < num && image->dx >= 0; x++) { for (x = 0; x < num; x++) {
info->fbops->fb_imageblit(info, image); info->fbops->fb_imageblit(info, image);
image->dx -= image->width + 8; image->dx -= image->width + 8;
} }
...@@ -445,7 +445,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, ...@@ -445,7 +445,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
image->dy += image->height + 8; image->dy += image->height + 8;
} }
} else if (rotate == FB_ROTATE_CCW) { } else if (rotate == FB_ROTATE_CCW) {
for (x = 0; x < num && image->dy >= 0; x++) { for (x = 0; x < num; x++) {
info->fbops->fb_imageblit(info, image); info->fbops->fb_imageblit(info, image);
image->dy -= image->height + 8; image->dy -= image->height + 8;
} }
...@@ -1180,7 +1180,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, ...@@ -1180,7 +1180,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
return -EFAULT; return -EFAULT;
if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES) if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
return -EINVAL; return -EINVAL;
if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX) if (con2fb.framebuffer >= FB_MAX)
return -EINVAL; return -EINVAL;
if (!registered_fb[con2fb.framebuffer]) if (!registered_fb[con2fb.framebuffer])
request_module("fb%d", con2fb.framebuffer); request_module("fb%d", con2fb.framebuffer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment